Previous Page | Next Page

The HTTP Procedure

Example 4: A POST That Captures the Response Headers


This example makes the same POST request as in A POST Through a Proxy but captures the response headers in a file called headerOut.txt.

filename in "u:\prochttp\Testware\ProxyTest_in";
filename out "u:\prochttp\Testware\ProxyTest_out.txt";
filename hdrout "u:\prochttp\Testware\headerOut.txt";
data _null_; 
   file in;
   input;
   put _infile_;
   datalines4;
appid=restbook&query=jellyfish
;;;;

 proc http 
    in=in 
    out=out 
    headerout=hdrout
    url="http://api.search.yahoo.com/WebSearchService/V1/webSearch?" 
    method="post"
    ct="application/x-www-form-urlencoded"
    proxyhost="inetgw.unx.sas.com"
    proxyport=80;
run;

Previous Page | Next Page | Top of Page