<?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 Unable to access a web page through proc http in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Unable-to-access-a-web-page-through-proc-http/m-p/69809#M20091</link>
    <description>Hi,&lt;BR /&gt;
&lt;BR /&gt;
I've been trying to use the proc http to download a simple html page from one of our internal website. This page requires authentication to access. I've been accessing this page using the wget -O functionality in UNIX, by specifying the user id and password in .netrc file in my home directory.&lt;BR /&gt;
&lt;BR /&gt;
However, when I try the below code in SAS 9.2, the html page that I get is login page which still asks my credentials to login.&lt;BR /&gt;
&lt;BR /&gt;
filename in "~/ProxyTest_in"; &lt;BR /&gt;
filename out "~/ProxyTest_out.html";&lt;BR /&gt;
filename hdrout "~/headerOut.txt";&lt;BR /&gt;
&lt;BR /&gt;
data _null_; &lt;BR /&gt;
file in; &lt;BR /&gt;
input; &lt;BR /&gt;
put _infile_; &lt;BR /&gt;
datalines4; &lt;BR /&gt;
&lt;BR /&gt;
;;;; &lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
proc http &lt;BR /&gt;
in=in &lt;BR /&gt;
out=out&lt;BR /&gt;
headerout=hdrout&lt;BR /&gt;
url="http://login.myportal.com/portal/Comp/TCC/landingPage" &lt;BR /&gt;
method="post" &lt;BR /&gt;
ct="application/x-www-form-urlencoded"&lt;BR /&gt;
webpassword="pwd" &lt;BR /&gt;
webusername="userid"&lt;BR /&gt;
proxyport=80&lt;BR /&gt;
proxyhost='http://login.myportal.com'&lt;BR /&gt;
; &lt;BR /&gt;
run; &lt;BR /&gt;
&lt;BR /&gt;
The header message shows that the response code is 200. However, the html page is not going beyond the login page.&lt;BR /&gt;
&lt;BR /&gt;
Note: When I copy this link in a browser, it uses my windows authentication and takes me directly to the home page (supasses the login page). Same is the case when I used to do a wget (using .netrc as the authentication mechanism).&lt;BR /&gt;
&lt;BR /&gt;
Thanks in Advance!&lt;BR /&gt;
Pramod</description>
    <pubDate>Thu, 26 May 2011 09:55:14 GMT</pubDate>
    <dc:creator>Pramod_R</dc:creator>
    <dc:date>2011-05-26T09:55:14Z</dc:date>
    <item>
      <title>Unable to access a web page through proc http</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Unable-to-access-a-web-page-through-proc-http/m-p/69809#M20091</link>
      <description>Hi,&lt;BR /&gt;
&lt;BR /&gt;
I've been trying to use the proc http to download a simple html page from one of our internal website. This page requires authentication to access. I've been accessing this page using the wget -O functionality in UNIX, by specifying the user id and password in .netrc file in my home directory.&lt;BR /&gt;
&lt;BR /&gt;
However, when I try the below code in SAS 9.2, the html page that I get is login page which still asks my credentials to login.&lt;BR /&gt;
&lt;BR /&gt;
filename in "~/ProxyTest_in"; &lt;BR /&gt;
filename out "~/ProxyTest_out.html";&lt;BR /&gt;
filename hdrout "~/headerOut.txt";&lt;BR /&gt;
&lt;BR /&gt;
data _null_; &lt;BR /&gt;
file in; &lt;BR /&gt;
input; &lt;BR /&gt;
put _infile_; &lt;BR /&gt;
datalines4; &lt;BR /&gt;
&lt;BR /&gt;
;;;; &lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
proc http &lt;BR /&gt;
in=in &lt;BR /&gt;
out=out&lt;BR /&gt;
headerout=hdrout&lt;BR /&gt;
url="http://login.myportal.com/portal/Comp/TCC/landingPage" &lt;BR /&gt;
method="post" &lt;BR /&gt;
ct="application/x-www-form-urlencoded"&lt;BR /&gt;
webpassword="pwd" &lt;BR /&gt;
webusername="userid"&lt;BR /&gt;
proxyport=80&lt;BR /&gt;
proxyhost='http://login.myportal.com'&lt;BR /&gt;
; &lt;BR /&gt;
run; &lt;BR /&gt;
&lt;BR /&gt;
The header message shows that the response code is 200. However, the html page is not going beyond the login page.&lt;BR /&gt;
&lt;BR /&gt;
Note: When I copy this link in a browser, it uses my windows authentication and takes me directly to the home page (supasses the login page). Same is the case when I used to do a wget (using .netrc as the authentication mechanism).&lt;BR /&gt;
&lt;BR /&gt;
Thanks in Advance!&lt;BR /&gt;
Pramod</description>
      <pubDate>Thu, 26 May 2011 09:55:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Unable-to-access-a-web-page-through-proc-http/m-p/69809#M20091</guid>
      <dc:creator>Pramod_R</dc:creator>
      <dc:date>2011-05-26T09:55:14Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to access a web page through proc http</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Unable-to-access-a-web-page-through-proc-http/m-p/69810#M20092</link>
      <description>At support.sas.com I found an example.But not sure whether it can work.&lt;BR /&gt;
[pre]&lt;BR /&gt;
filename foo url 'https://www.b.com/file1.html'&lt;BR /&gt;
         user='jones' prompt;&lt;BR /&gt;
&lt;BR /&gt;
[/pre]&lt;BR /&gt;
&lt;BR /&gt;
Ksharp</description>
      <pubDate>Fri, 27 May 2011 10:00:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Unable-to-access-a-web-page-through-proc-http/m-p/69810#M20092</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2011-05-27T10:00:52Z</dc:date>
    </item>
  </channel>
</rss>

