<?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 Re: how to use information from cURL when using POST method in PROC HTTP in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/how-to-use-information-from-cURL-when-using-POST-method-in-PROC/m-p/537890#M6838</link>
    <description>&lt;P&gt;Thanks VDD, but I'm in the mood to reply today.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/34629"&gt;@jteres&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;I see now that this got posted in "New SAS User," which was a mistake.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;I'm sorry, my crystal ball is broken so I couldn't possibly know that today. Maybe tomorrow it'll be working.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;These are just top google hits. They aren't relevant to my specific question.&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;No, these were curated, I did search for it and posted the few I thought were relevant to your question.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/34629"&gt;@jteres&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;I guess I would ask why you are responding to topics that you don't seem to know anything about? It's not helpful, nor is it a constructive use of the forum.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Because 99% of the time I can figure it out pretty quickly and I'm usually happy to work with people to help solve their issues when it's something I haven't done before. Then I learn something too. Ergo why I actually asked, "have you read these?" and did not say, "go read these".&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Good Bye. I'm not following this post any longer.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-SPOILER&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/34629"&gt;@jteres&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;I see now that this got posted in "New SAS User," which was a mistake.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;These are just top google hits. They aren't relevant to my specific question.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The first example uses this:&lt;/P&gt;
&lt;PRE&gt;proc http
&amp;nbsp;&amp;nbsp; url="http://feeds.bbci.co.uk/news/technology/rss.xml"
&amp;nbsp;&amp;nbsp; out=source;
run;&lt;/PRE&gt;
&lt;P&gt;and that's the full extent of PROC HTTP code in that guide.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The second link is the same blog post that&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/3480"&gt;@BillM_SAS&lt;/a&gt;&amp;nbsp;pointed to. Again, not useful here because the method in PROC HTTP specified is GET and not POST.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The Dakota Inmate data uses the URL option in a FILENAME statement. I can't inspect further because that URL is no longer live.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Using curl to pipe a text file might very well be the best worst case option, but again, that doesn't answer my question about how to think about PROC HTTP.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I guess I would ask why you are responding to topics that you don't seem to know anything about? It's not helpful, nor is it a constructive use of the forum.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13879"&gt;@Reeza&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Have you read these?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H1 class="post-title item fn"&gt;Webpage scraping made easy with PROC HTTP&lt;/H1&gt;
&lt;P&gt;&lt;A href="https://blogs.sas.com/content/sastraining/2019/02/05/webpage-scraping-made-easy-with-proc-http/" target="_blank" rel="noopener"&gt;https://blogs.sas.com/content/sastraining/2019/02/05/webpage-scraping-made-easy-with-proc-http/&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H1 class="post-title item fn"&gt;How to scrape data from a web page using SAS&lt;/H1&gt;
&lt;P&gt;&lt;A href="https://blogs.sas.com/content/sasdummy/2017/12/04/scrape-web-page-data/" target="_blank" rel="noopener"&gt;https://blogs.sas.com/content/sasdummy/2017/12/04/scrape-web-page-data/&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Scraping Dakota Inmate Data&lt;/P&gt;
&lt;P&gt;&lt;A href="https://support.sas.com/resources/papers/proceedings11/140-2011.pdf" target="_blank" rel="noopener"&gt;https://support.sas.com/resources/papers/proceedings11/140-2011.pdf&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Worse case scenario use CURL in your OS to pipe to a txt file and use SAS to read that and pass the command to the OS.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Illustrated here (note 2012 so definitely out of date)&lt;/P&gt;
&lt;P&gt;&lt;A href="https://support.sas.com/resources/papers/proceedings12/121-2012.pdf" target="_blank" rel="noopener"&gt;https://support.sas.com/resources/papers/proceedings12/121-2012.pdf&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/34629"&gt;@jteres&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Can someone please explain how to map the information from a cURL into something usable in PROC HTTP?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I went to a website (sorry for being vague) and manually selected values and used the Chrome developer tools to capture the cURL.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;All the cURL values have this general form-- a url followed by several header paramters, followed by some parmeters in a --data list, followed by --compressed:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;curl 'url' [http://www.website.net] [header parameters e.g. -H 'Connection: keep-alive' -H 'Cache-Control: max-age=0' etc etc
-- data 'PARAM1=value1&amp;amp;PARAM2=value2&amp;amp;PARAM3=&amp;amp;PARAM4=value4'
--compressed&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I've played around a bit with the cURL in a Mac OS terminal window, so I know that it's valid and returns what I'm looking for.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I can't find anything that lays out how to use this information in PROC HTTP, though. Most examples online either use the "GET" method, or are referencing JSON, or are using curl in an X command in SAS. The documentation shows a very bare bones POST example, as well as examples using a proxy server, but nothing has really addressed what I'm looking for.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I tried using FILE and PUT like this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data _null_;
     file test ;

     if _n_ eq 1 then
          do ;
               put 'param1=value1' @;
               put 'param2=value2' @ ;
               put 'param3=value3' @ ;
/* etc */
          end ;
run ;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;and then:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc http 
   url="https://www.website.net/default.aspx" 
   in='test'
   out=siteout ;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;But that just gives me back the URL referenced in PROC HTTP, and not the site that would be created by submitting the parameters specified (which I got from the cURL).&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Maybe I'm missing something really fundamental and basic, but I've read everything I could find, and nothing seems to relate to this directly. Also, lots of the examples leap quickly into being inside a macro loop or something, so it's hard to figure out the basics in the midst of the more advanced coding context of macros. Don't get me wrong, I know macros, but I'm just trying to work out the basics of PROC HTTP before I turn to Python for the scraping.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Jed&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;/LI-SPOILER&gt;
&lt;BLOCKQUOTE&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;BLOCKQUOTE&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;/BLOCKQUOTE&gt;</description>
    <pubDate>Fri, 22 Feb 2019 21:49:21 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2019-02-22T21:49:21Z</dc:date>
    <item>
      <title>how to use information from cURL when using POST method in PROC HTTP</title>
      <link>https://communities.sas.com/t5/New-SAS-User/how-to-use-information-from-cURL-when-using-POST-method-in-PROC/m-p/537849#M6832</link>
      <description>&lt;P&gt;Can someone please explain how to map the information from a cURL into something usable in PROC HTTP?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I went to a website (sorry for being vague) and manually selected values and used the Chrome developer tools to capture the cURL.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;All the cURL values have this general form-- a url followed by several header paramters, followed by some parmeters in a --data list, followed by --compressed:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;curl 'url' [http://www.website.net] [header parameters e.g. -H 'Connection: keep-alive' -H 'Cache-Control: max-age=0' etc etc
-- data 'PARAM1=value1&amp;amp;PARAM2=value2&amp;amp;PARAM3=&amp;amp;PARAM4=value4'
--compressed&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I've played around a bit with the cURL in a Mac OS terminal window, so I know that it's valid and returns what I'm looking for.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I can't find anything that lays out how to use this information in PROC HTTP, though. Most examples online either use the "GET" method, or are referencing JSON, or are using curl in an X command in SAS. The documentation shows a very bare bones POST example, as well as examples using a proxy server, but nothing has really addressed what I'm looking for.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I tried using FILE and PUT like this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data _null_;
     file test ;

     if _n_ eq 1 then
          do ;
               put 'param1=value1' @;
               put 'param2=value2' @ ;
               put 'param3=value3' @ ;
/* etc */
          end ;
run ;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;and then:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc http 
   url="https://www.website.net/default.aspx" 
   in='test'
   out=siteout ;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;But that just gives me back the URL referenced in PROC HTTP, and not the site that would be created by submitting the parameters specified (which I got from the cURL).&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Maybe I'm missing something really fundamental and basic, but I've read everything I could find, and nothing seems to relate to this directly. Also, lots of the examples leap quickly into being inside a macro loop or something, so it's hard to figure out the basics in the midst of the more advanced coding context of macros. Don't get me wrong, I know macros, but I'm just trying to work out the basics of PROC HTTP before I turn to Python for the scraping.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Jed&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 22 Feb 2019 20:40:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/how-to-use-information-from-cURL-when-using-POST-method-in-PROC/m-p/537849#M6832</guid>
      <dc:creator>jteres</dc:creator>
      <dc:date>2019-02-22T20:40:24Z</dc:date>
    </item>
    <item>
      <title>Re: how to use information from cURL when using POST method in PROC HTTP</title>
      <link>https://communities.sas.com/t5/New-SAS-User/how-to-use-information-from-cURL-when-using-POST-method-in-PROC/m-p/537863#M6833</link>
      <description>&lt;P&gt;While it does not appear to address your cURL question, &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/4"&gt;@ChrisHemedinger&lt;/a&gt; did write a &lt;A href="https://blogs.sas.com/content/sasdummy/2017/12/04/scrape-web-page-data/" target="_self"&gt;post on using PROC HTTP to scrape web pages&lt;/A&gt;. This might get you going in the right direction with PROC HTTP.&lt;/P&gt;</description>
      <pubDate>Fri, 22 Feb 2019 20:57:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/how-to-use-information-from-cURL-when-using-POST-method-in-PROC/m-p/537863#M6833</guid>
      <dc:creator>BillM_SAS</dc:creator>
      <dc:date>2019-02-22T20:57:19Z</dc:date>
    </item>
    <item>
      <title>Re: how to use information from cURL when using POST method in PROC HTTP</title>
      <link>https://communities.sas.com/t5/New-SAS-User/how-to-use-information-from-cURL-when-using-POST-method-in-PROC/m-p/537870#M6834</link>
      <description>&lt;P&gt;I saw this post before, and while his examples of how to parse the resulting data are useful,&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/4"&gt;@ChrisHemedinger&lt;/a&gt;'s PROC HTTP calls use the GET method, which is more intuitive and I wish I could apply it here.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Fri, 22 Feb 2019 21:01:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/how-to-use-information-from-cURL-when-using-POST-method-in-PROC/m-p/537870#M6834</guid>
      <dc:creator>jteres</dc:creator>
      <dc:date>2019-02-22T21:01:30Z</dc:date>
    </item>
    <item>
      <title>Re: how to use information from cURL when using POST method in PROC HTTP</title>
      <link>https://communities.sas.com/t5/New-SAS-User/how-to-use-information-from-cURL-when-using-POST-method-in-PROC/m-p/537871#M6835</link>
      <description>&lt;P&gt;Have you read these?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H1 class="post-title item fn"&gt;Webpage scraping made easy with PROC HTTP&lt;/H1&gt;
&lt;P&gt;&lt;A href="https://blogs.sas.com/content/sastraining/2019/02/05/webpage-scraping-made-easy-with-proc-http/" target="_blank"&gt;https://blogs.sas.com/content/sastraining/2019/02/05/webpage-scraping-made-easy-with-proc-http/&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H1 class="post-title item fn"&gt;How to scrape data from a web page using SAS&lt;/H1&gt;
&lt;P&gt;&lt;A href="https://blogs.sas.com/content/sasdummy/2017/12/04/scrape-web-page-data/" target="_blank"&gt;https://blogs.sas.com/content/sasdummy/2017/12/04/scrape-web-page-data/&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Scraping Dakota Inmate Data&lt;/P&gt;
&lt;P&gt;&lt;A href="https://support.sas.com/resources/papers/proceedings11/140-2011.pdf" target="_blank"&gt;https://support.sas.com/resources/papers/proceedings11/140-2011.pdf&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Worse case scenario use CURL in your OS to pipe to a txt file and use SAS to read that and pass the command to the OS.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Illustrated here (note 2012 so definitely out of date)&lt;/P&gt;
&lt;P&gt;&lt;A href="https://support.sas.com/resources/papers/proceedings12/121-2012.pdf" target="_blank"&gt;https://support.sas.com/resources/papers/proceedings12/121-2012.pdf&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/34629"&gt;@jteres&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Can someone please explain how to map the information from a cURL into something usable in PROC HTTP?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I went to a website (sorry for being vague) and manually selected values and used the Chrome developer tools to capture the cURL.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;All the cURL values have this general form-- a url followed by several header paramters, followed by some parmeters in a --data list, followed by --compressed:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;curl 'url' [http://www.website.net] [header parameters e.g. -H 'Connection: keep-alive' -H 'Cache-Control: max-age=0' etc etc
-- data 'PARAM1=value1&amp;amp;PARAM2=value2&amp;amp;PARAM3=&amp;amp;PARAM4=value4'
--compressed&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I've played around a bit with the cURL in a Mac OS terminal window, so I know that it's valid and returns what I'm looking for.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I can't find anything that lays out how to use this information in PROC HTTP, though. Most examples online either use the "GET" method, or are referencing JSON, or are using curl in an X command in SAS. The documentation shows a very bare bones POST example, as well as examples using a proxy server, but nothing has really addressed what I'm looking for.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I tried using FILE and PUT like this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data _null_;
     file test ;

     if _n_ eq 1 then
          do ;
               put 'param1=value1' @;
               put 'param2=value2' @ ;
               put 'param3=value3' @ ;
/* etc */
          end ;
run ;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;and then:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc http 
   url="https://www.website.net/default.aspx" 
   in='test'
   out=siteout ;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;But that just gives me back the URL referenced in PROC HTTP, and not the site that would be created by submitting the parameters specified (which I got from the cURL).&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Maybe I'm missing something really fundamental and basic, but I've read everything I could find, and nothing seems to relate to this directly. Also, lots of the examples leap quickly into being inside a macro loop or something, so it's hard to figure out the basics in the midst of the more advanced coding context of macros. Don't get me wrong, I know macros, but I'm just trying to work out the basics of PROC HTTP before I turn to Python for the scraping.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Jed&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 22 Feb 2019 21:02:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/how-to-use-information-from-cURL-when-using-POST-method-in-PROC/m-p/537871#M6835</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2019-02-22T21:02:07Z</dc:date>
    </item>
    <item>
      <title>Re: how to use information from cURL when using POST method in PROC HTTP</title>
      <link>https://communities.sas.com/t5/New-SAS-User/how-to-use-information-from-cURL-when-using-POST-method-in-PROC/m-p/537876#M6836</link>
      <description>&lt;P&gt;I see now that this got posted in "New SAS User," which was a mistake.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;These are just top google hits. They aren't relevant to my specific question.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The first example uses this:&lt;/P&gt;
&lt;PRE&gt;proc http
&amp;nbsp;&amp;nbsp; url="http://feeds.bbci.co.uk/news/technology/rss.xml"
&amp;nbsp;&amp;nbsp; out=source;
run;&lt;/PRE&gt;
&lt;P&gt;and that's the full extent of PROC HTTP code in that guide.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The second link is the same blog post that&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/3480"&gt;@BillM_SAS&lt;/a&gt;&amp;nbsp;pointed to. Again, not useful here because the method in PROC HTTP specified is GET and not POST.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The Dakota Inmate data uses the URL option in a FILENAME statement. I can't inspect further because that URL is no longer live.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Using curl to pipe a text file might very well be the best worst case option, but again, that doesn't answer my question about how to think about PROC HTTP.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I guess I would ask why you are responding to topics that you don't seem to know anything about? It's not helpful, nor is it a constructive use of the forum.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13879"&gt;@Reeza&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Have you read these?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H1 class="post-title item fn"&gt;Webpage scraping made easy with PROC HTTP&lt;/H1&gt;
&lt;P&gt;&lt;A href="https://blogs.sas.com/content/sastraining/2019/02/05/webpage-scraping-made-easy-with-proc-http/" target="_blank" rel="noopener"&gt;https://blogs.sas.com/content/sastraining/2019/02/05/webpage-scraping-made-easy-with-proc-http/&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H1 class="post-title item fn"&gt;How to scrape data from a web page using SAS&lt;/H1&gt;
&lt;P&gt;&lt;A href="https://blogs.sas.com/content/sasdummy/2017/12/04/scrape-web-page-data/" target="_blank" rel="noopener"&gt;https://blogs.sas.com/content/sasdummy/2017/12/04/scrape-web-page-data/&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Scraping Dakota Inmate Data&lt;/P&gt;
&lt;P&gt;&lt;A href="https://support.sas.com/resources/papers/proceedings11/140-2011.pdf" target="_blank" rel="noopener"&gt;https://support.sas.com/resources/papers/proceedings11/140-2011.pdf&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Worse case scenario use CURL in your OS to pipe to a txt file and use SAS to read that and pass the command to the OS.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Illustrated here (note 2012 so definitely out of date)&lt;/P&gt;
&lt;P&gt;&lt;A href="https://support.sas.com/resources/papers/proceedings12/121-2012.pdf" target="_blank" rel="noopener"&gt;https://support.sas.com/resources/papers/proceedings12/121-2012.pdf&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/34629"&gt;@jteres&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Can someone please explain how to map the information from a cURL into something usable in PROC HTTP?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I went to a website (sorry for being vague) and manually selected values and used the Chrome developer tools to capture the cURL.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;All the cURL values have this general form-- a url followed by several header paramters, followed by some parmeters in a --data list, followed by --compressed:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;curl 'url' [http://www.website.net] [header parameters e.g. -H 'Connection: keep-alive' -H 'Cache-Control: max-age=0' etc etc
-- data 'PARAM1=value1&amp;amp;PARAM2=value2&amp;amp;PARAM3=&amp;amp;PARAM4=value4'
--compressed&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I've played around a bit with the cURL in a Mac OS terminal window, so I know that it's valid and returns what I'm looking for.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I can't find anything that lays out how to use this information in PROC HTTP, though. Most examples online either use the "GET" method, or are referencing JSON, or are using curl in an X command in SAS. The documentation shows a very bare bones POST example, as well as examples using a proxy server, but nothing has really addressed what I'm looking for.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I tried using FILE and PUT like this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data _null_;
     file test ;

     if _n_ eq 1 then
          do ;
               put 'param1=value1' @;
               put 'param2=value2' @ ;
               put 'param3=value3' @ ;
/* etc */
          end ;
run ;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;and then:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc http 
   url="https://www.website.net/default.aspx" 
   in='test'
   out=siteout ;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;But that just gives me back the URL referenced in PROC HTTP, and not the site that would be created by submitting the parameters specified (which I got from the cURL).&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Maybe I'm missing something really fundamental and basic, but I've read everything I could find, and nothing seems to relate to this directly. Also, lots of the examples leap quickly into being inside a macro loop or something, so it's hard to figure out the basics in the midst of the more advanced coding context of macros. Don't get me wrong, I know macros, but I'm just trying to work out the basics of PROC HTTP before I turn to Python for the scraping.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Jed&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 22 Feb 2019 21:19:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/how-to-use-information-from-cURL-when-using-POST-method-in-PROC/m-p/537876#M6836</guid>
      <dc:creator>jteres</dc:creator>
      <dc:date>2019-02-22T21:19:28Z</dc:date>
    </item>
    <item>
      <title>Re: how to use information from cURL when using POST method in PROC HTTP</title>
      <link>https://communities.sas.com/t5/New-SAS-User/how-to-use-information-from-cURL-when-using-POST-method-in-PROC/m-p/537883#M6837</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/34629"&gt;@jteres&lt;/a&gt;&amp;nbsp;Please be kind and rewind.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The community is here to assist you, but we don't always have the immediate answer that you may be seeking to questions that need to be more than a snippet of the project scope.&lt;/P&gt;
&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13879"&gt;@Reeza&lt;/a&gt; nor any other community should have to defined themselves from such a response.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 22 Feb 2019 21:36:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/how-to-use-information-from-cURL-when-using-POST-method-in-PROC/m-p/537883#M6837</guid>
      <dc:creator>VDD</dc:creator>
      <dc:date>2019-02-22T21:36:29Z</dc:date>
    </item>
    <item>
      <title>Re: how to use information from cURL when using POST method in PROC HTTP</title>
      <link>https://communities.sas.com/t5/New-SAS-User/how-to-use-information-from-cURL-when-using-POST-method-in-PROC/m-p/537890#M6838</link>
      <description>&lt;P&gt;Thanks VDD, but I'm in the mood to reply today.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/34629"&gt;@jteres&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;I see now that this got posted in "New SAS User," which was a mistake.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;I'm sorry, my crystal ball is broken so I couldn't possibly know that today. Maybe tomorrow it'll be working.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;These are just top google hits. They aren't relevant to my specific question.&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;No, these were curated, I did search for it and posted the few I thought were relevant to your question.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/34629"&gt;@jteres&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;I guess I would ask why you are responding to topics that you don't seem to know anything about? It's not helpful, nor is it a constructive use of the forum.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Because 99% of the time I can figure it out pretty quickly and I'm usually happy to work with people to help solve their issues when it's something I haven't done before. Then I learn something too. Ergo why I actually asked, "have you read these?" and did not say, "go read these".&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Good Bye. I'm not following this post any longer.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-SPOILER&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/34629"&gt;@jteres&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;I see now that this got posted in "New SAS User," which was a mistake.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;These are just top google hits. They aren't relevant to my specific question.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The first example uses this:&lt;/P&gt;
&lt;PRE&gt;proc http
&amp;nbsp;&amp;nbsp; url="http://feeds.bbci.co.uk/news/technology/rss.xml"
&amp;nbsp;&amp;nbsp; out=source;
run;&lt;/PRE&gt;
&lt;P&gt;and that's the full extent of PROC HTTP code in that guide.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The second link is the same blog post that&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/3480"&gt;@BillM_SAS&lt;/a&gt;&amp;nbsp;pointed to. Again, not useful here because the method in PROC HTTP specified is GET and not POST.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The Dakota Inmate data uses the URL option in a FILENAME statement. I can't inspect further because that URL is no longer live.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Using curl to pipe a text file might very well be the best worst case option, but again, that doesn't answer my question about how to think about PROC HTTP.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I guess I would ask why you are responding to topics that you don't seem to know anything about? It's not helpful, nor is it a constructive use of the forum.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13879"&gt;@Reeza&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Have you read these?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H1 class="post-title item fn"&gt;Webpage scraping made easy with PROC HTTP&lt;/H1&gt;
&lt;P&gt;&lt;A href="https://blogs.sas.com/content/sastraining/2019/02/05/webpage-scraping-made-easy-with-proc-http/" target="_blank" rel="noopener"&gt;https://blogs.sas.com/content/sastraining/2019/02/05/webpage-scraping-made-easy-with-proc-http/&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H1 class="post-title item fn"&gt;How to scrape data from a web page using SAS&lt;/H1&gt;
&lt;P&gt;&lt;A href="https://blogs.sas.com/content/sasdummy/2017/12/04/scrape-web-page-data/" target="_blank" rel="noopener"&gt;https://blogs.sas.com/content/sasdummy/2017/12/04/scrape-web-page-data/&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Scraping Dakota Inmate Data&lt;/P&gt;
&lt;P&gt;&lt;A href="https://support.sas.com/resources/papers/proceedings11/140-2011.pdf" target="_blank" rel="noopener"&gt;https://support.sas.com/resources/papers/proceedings11/140-2011.pdf&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Worse case scenario use CURL in your OS to pipe to a txt file and use SAS to read that and pass the command to the OS.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Illustrated here (note 2012 so definitely out of date)&lt;/P&gt;
&lt;P&gt;&lt;A href="https://support.sas.com/resources/papers/proceedings12/121-2012.pdf" target="_blank" rel="noopener"&gt;https://support.sas.com/resources/papers/proceedings12/121-2012.pdf&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/34629"&gt;@jteres&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Can someone please explain how to map the information from a cURL into something usable in PROC HTTP?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I went to a website (sorry for being vague) and manually selected values and used the Chrome developer tools to capture the cURL.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;All the cURL values have this general form-- a url followed by several header paramters, followed by some parmeters in a --data list, followed by --compressed:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;curl 'url' [http://www.website.net] [header parameters e.g. -H 'Connection: keep-alive' -H 'Cache-Control: max-age=0' etc etc
-- data 'PARAM1=value1&amp;amp;PARAM2=value2&amp;amp;PARAM3=&amp;amp;PARAM4=value4'
--compressed&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I've played around a bit with the cURL in a Mac OS terminal window, so I know that it's valid and returns what I'm looking for.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I can't find anything that lays out how to use this information in PROC HTTP, though. Most examples online either use the "GET" method, or are referencing JSON, or are using curl in an X command in SAS. The documentation shows a very bare bones POST example, as well as examples using a proxy server, but nothing has really addressed what I'm looking for.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I tried using FILE and PUT like this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data _null_;
     file test ;

     if _n_ eq 1 then
          do ;
               put 'param1=value1' @;
               put 'param2=value2' @ ;
               put 'param3=value3' @ ;
/* etc */
          end ;
run ;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;and then:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc http 
   url="https://www.website.net/default.aspx" 
   in='test'
   out=siteout ;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;But that just gives me back the URL referenced in PROC HTTP, and not the site that would be created by submitting the parameters specified (which I got from the cURL).&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Maybe I'm missing something really fundamental and basic, but I've read everything I could find, and nothing seems to relate to this directly. Also, lots of the examples leap quickly into being inside a macro loop or something, so it's hard to figure out the basics in the midst of the more advanced coding context of macros. Don't get me wrong, I know macros, but I'm just trying to work out the basics of PROC HTTP before I turn to Python for the scraping.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Jed&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;/LI-SPOILER&gt;
&lt;BLOCKQUOTE&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;BLOCKQUOTE&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;/BLOCKQUOTE&gt;</description>
      <pubDate>Fri, 22 Feb 2019 21:49:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/how-to-use-information-from-cURL-when-using-POST-method-in-PROC/m-p/537890#M6838</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2019-02-22T21:49:21Z</dc:date>
    </item>
    <item>
      <title>Re: how to use information from cURL when using POST method in PROC HTTP</title>
      <link>https://communities.sas.com/t5/New-SAS-User/how-to-use-information-from-cURL-when-using-POST-method-in-PROC/m-p/537893#M6839</link>
      <description>&lt;P&gt;To respond to your comment,&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/122002"&gt;@VDD&lt;/a&gt;, I came to the forum because people are usually helpful and nice.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;A response like what I got from Reeza is not helpful. I don't know how else to say it, and I'm certainly not going to pretend it's useful when it's not. If anything, it's a further waste of my time to have to go through and explain why things aren't useful. I wrote in my initial message,&amp;nbsp;&lt;SPAN&gt;"Maybe I'm missing something really fundamental and basic, but I've read everything I could find, and nothing seems to relate to this directly."&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;The reason I wrote that was to indicate that this is not my first stop.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;I apologize if I violated the decorum of the forum. It was not my intention to violate forum decorum, but it's frustrating when I see a response to a question that I've been struggling with only to find that it doesn't actually address the issue I'm citing.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 22 Feb 2019 22:00:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/how-to-use-information-from-cURL-when-using-POST-method-in-PROC/m-p/537893#M6839</guid>
      <dc:creator>jteres</dc:creator>
      <dc:date>2019-02-22T22:00:44Z</dc:date>
    </item>
    <item>
      <title>Re: how to use information from cURL when using POST method in PROC HTTP</title>
      <link>https://communities.sas.com/t5/New-SAS-User/how-to-use-information-from-cURL-when-using-POST-method-in-PROC/m-p/537894#M6840</link>
      <description>&lt;P&gt;I have several examples of PROC HTTP that include POST calls.&amp;nbsp; See &lt;A href="https://blogs.sas.com/content/tag/proc-http/" target="_self"&gt;the whole collection here (you'll have to sift through for POST examples)&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Your cURL example didn't seem to have a POST in it, but you can get your params/data passed with the IN= option.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;filename resp temp;
proc http
 method="POST"
 in='PARAM1=value1&amp;amp;PARAM2=value2&amp;amp;PARAM3=&amp;amp;PARAM4=value4'
 url="https://website.net"
 out=resp;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Seems like your site might require a login or maybe relies on cookies to track a session -- PROC HTTP has options for that too.&lt;/P&gt;</description>
      <pubDate>Fri, 22 Feb 2019 22:03:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/how-to-use-information-from-cURL-when-using-POST-method-in-PROC/m-p/537894#M6840</guid>
      <dc:creator>ChrisHemedinger</dc:creator>
      <dc:date>2019-02-22T22:03:08Z</dc:date>
    </item>
    <item>
      <title>Re: how to use information from cURL when using POST method in PROC HTTP</title>
      <link>https://communities.sas.com/t5/New-SAS-User/how-to-use-information-from-cURL-when-using-POST-method-in-PROC/m-p/538346#M6923</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/4"&gt;@ChrisHemedinger&lt;/a&gt;,&amp;nbsp;it turns out the piece I was missing was the CT specificiation.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here are the steps I took:&lt;/P&gt;
&lt;P&gt;1. Went to the website of interest in Chrome&amp;nbsp;&lt;/P&gt;
&lt;P&gt;2. Entered the relevant info to return the results I wanted to capture&lt;/P&gt;
&lt;P&gt;3. In the Chrome developer tools, I copied the network initiator for default.aspx (under the network tab) and copied it as cURL&lt;/P&gt;
&lt;P&gt;4. The cURL has the following format (which I outlined in the original post)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;curl 
'[url]'
 -H 'Connection: keep-alive'
(other header stuff)
 -H 'Content-Type: application/x-www-form-urlencoded' 

 
 --data (list of parameters, separated by &amp;amp;, the whole string in quotes)&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The list of values in the data stream was too long to copy into my EG code node, so I saved it to a flat file and read it in that way.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Then I used PROC HTTP.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc http 
   url="[url]"
   ct="application/x-www-form-urlencoded"
   out=resp ;
run ;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The part I hadn't been able to connect was that I needed to supply the information in the "content type" part of the header as the CT value in the PROC HTTP. Otherwise, the parameter specs were the same.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I tried many variations before this worked, and it seemed that without the CT value of "application/x-www-form-urlencoded," the results I was getting were just for the launch site, and not the actual data i was after.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The documentation is clear in that it says "&lt;SPAN&gt;Specify the HTTP content-type to be set in the request headers." for the CT parameter in PROC HTTP. The simple POST request example shows that also:&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;A href="http://support.sas.com/documentation/cdl/en/proc/61895/HTML/default/viewer.htm#a003286808.htm" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/proc/61895/HTML/default/viewer.htm#a003286808.htm&lt;/A&gt; as well.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;It was actually reading up on POST vs GET here:&amp;nbsp;&lt;A href="https://www.w3schools.com/tags/ref_httpmethods.asp" target="_blank"&gt;https://www.w3schools.com/tags/ref_httpmethods.asp&lt;/A&gt; and more about POST here:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;A href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/POST" target="_blank"&gt;https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/POST&lt;/A&gt; that helped connect the dots as well.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;There was one post on the forums (that you also referenced in a subsequent blog post) that I am having trouble putting my finger on at the moment, but you looped in the PROC HTTP developer, who I believe posted something about including "boundary" definitions&amp;nbsp;in the code. That made more sense after reading the mozilla dev link.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Anyway, I hope someone else finds this all useful. Onto parsing the data....&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 25 Feb 2019 17:09:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/how-to-use-information-from-cURL-when-using-POST-method-in-PROC/m-p/538346#M6923</guid>
      <dc:creator>jteres</dc:creator>
      <dc:date>2019-02-25T17:09:45Z</dc:date>
    </item>
    <item>
      <title>Re: how to use information from cURL when using POST method in PROC HTTP</title>
      <link>https://communities.sas.com/t5/New-SAS-User/how-to-use-information-from-cURL-when-using-POST-method-in-PROC/m-p/538363#M6926</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/34629"&gt;@jteres&lt;/a&gt;&amp;nbsp;One more note for you.&amp;nbsp; Up until SAS 9.4 Maint 2, PROC HTTP default method was POST.&amp;nbsp; Later, it was changed to GET -- appropriate for most operations.&amp;nbsp; If you're running in SAS 9.4m3 or higher, then your code is actually using GET.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you're really needing a POST operation, best practice is to include the&amp;nbsp;&lt;STRONG&gt;method="POST"&lt;/STRONG&gt; option.&amp;nbsp; I always provide the method= option, just so it's obvious to me later...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Chris&lt;/P&gt;</description>
      <pubDate>Mon, 25 Feb 2019 18:25:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/how-to-use-information-from-cURL-when-using-POST-method-in-PROC/m-p/538363#M6926</guid>
      <dc:creator>ChrisHemedinger</dc:creator>
      <dc:date>2019-02-25T18:25:43Z</dc:date>
    </item>
  </channel>
</rss>

