<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Retrieving data from a stored process with curl in Developers</title>
    <link>https://communities.sas.com/t5/Developers/Retrieving-data-from-a-stored-process-with-curl/m-p/483508#M5745</link>
    <description>&lt;P&gt;I have a simple "Hello World" stored process, and I can successfully call it from my browser and get the results directly by passing in my user/pass credentials as part of the URL request (so the login page never shows).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm trying to replicate the above behaviour by passing the same URL to curl, but I keep getting the login screen as a result.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;From the browser, the URL looks like:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;http://myserver.com:7980/SASStoredProcess/do?&lt;BR /&gt;_program=my_program&amp;amp;_username=my_user_name&amp;amp;_password=%7BSAS002%7DEFFF...&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;From curl (running from a Linux64 bash shell), I've tried a multitude of parameters etc, but my latest version is:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;curl -v -L -k -d "_program=my_program&amp;amp;_username=my_user_name&amp;amp;_password=%7BSAS002%7DEFFF..."  
http://myserver.com:7980/SASStoredProcess/do&lt;/PRE&gt;
&lt;P&gt;As I mentioned, it results in the login screen.&amp;nbsp; I've also tried the /do1 request with the same results.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I believe I have everything configured correctly in SAS Management Console, as the request works fine from the browser URL.&amp;nbsp; Where am I going wrong?&lt;/P&gt;</description>
    <pubDate>Thu, 02 Aug 2018 18:08:50 GMT</pubDate>
    <dc:creator>RobP</dc:creator>
    <dc:date>2018-08-02T18:08:50Z</dc:date>
    <item>
      <title>Retrieving data from a stored process with curl</title>
      <link>https://communities.sas.com/t5/Developers/Retrieving-data-from-a-stored-process-with-curl/m-p/483508#M5745</link>
      <description>&lt;P&gt;I have a simple "Hello World" stored process, and I can successfully call it from my browser and get the results directly by passing in my user/pass credentials as part of the URL request (so the login page never shows).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm trying to replicate the above behaviour by passing the same URL to curl, but I keep getting the login screen as a result.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;From the browser, the URL looks like:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;http://myserver.com:7980/SASStoredProcess/do?&lt;BR /&gt;_program=my_program&amp;amp;_username=my_user_name&amp;amp;_password=%7BSAS002%7DEFFF...&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;From curl (running from a Linux64 bash shell), I've tried a multitude of parameters etc, but my latest version is:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;curl -v -L -k -d "_program=my_program&amp;amp;_username=my_user_name&amp;amp;_password=%7BSAS002%7DEFFF..."  
http://myserver.com:7980/SASStoredProcess/do&lt;/PRE&gt;
&lt;P&gt;As I mentioned, it results in the login screen.&amp;nbsp; I've also tried the /do1 request with the same results.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I believe I have everything configured correctly in SAS Management Console, as the request works fine from the browser URL.&amp;nbsp; Where am I going wrong?&lt;/P&gt;</description>
      <pubDate>Thu, 02 Aug 2018 18:08:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Developers/Retrieving-data-from-a-stored-process-with-curl/m-p/483508#M5745</guid>
      <dc:creator>RobP</dc:creator>
      <dc:date>2018-08-02T18:08:50Z</dc:date>
    </item>
    <item>
      <title>Re: Retrieving data from a stored process with curl</title>
      <link>https://communities.sas.com/t5/Developers/Retrieving-data-from-a-stored-process-with-curl/m-p/485138#M5746</link>
      <description>&lt;P&gt;You're just missing the&amp;nbsp;options to &lt;A href="https://www.rawsas.com/2018/08/using-curl-with-sas-stored-processes/" target="_self"&gt;read / write cookies&lt;/A&gt;&amp;nbsp;(this is where the session token is stored).&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Try the following:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;curl -v -L -k -c cookiefile -b cookiefile \&lt;BR /&gt;    -d "_program=my_program&amp;amp;_username=my_user_name&amp;amp;_password=%7BSAS002%7DEFFF..." \&lt;BR /&gt;    http://myserver.com:7980/SASStoredProcess/do&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 08 Aug 2018 13:09:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Developers/Retrieving-data-from-a-stored-process-with-curl/m-p/485138#M5746</guid>
      <dc:creator>AllanBowe</dc:creator>
      <dc:date>2018-08-08T13:09:47Z</dc:date>
    </item>
    <item>
      <title>Re: Retrieving data from a stored process with curl</title>
      <link>https://communities.sas.com/t5/Developers/Retrieving-data-from-a-stored-process-with-curl/m-p/485153#M5747</link>
      <description>&lt;P&gt;Yes! That was it... thank you so much!&lt;/P&gt;</description>
      <pubDate>Wed, 08 Aug 2018 13:50:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Developers/Retrieving-data-from-a-stored-process-with-curl/m-p/485153#M5747</guid>
      <dc:creator>RobP</dc:creator>
      <dc:date>2018-08-08T13:50:34Z</dc:date>
    </item>
  </channel>
</rss>

