HTTP Procedure
Example 4: A POST That Captures the Response Headers
Details
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.
Program
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;
Copyright © SAS Institute Inc. All rights reserved.