Hello, I meet a problem when using PROC HTTP to get the data from web. I use Linux and SAS 9.4 M5.
Below curl command works.
curl -X POST -H 'xxxxx: xxxx' -i 'http://url/api/' --data '{"attr1":[1284,1296,1300,1426,1428],"attr2":[664,622,657],"attr3":[],"attr4":[],"attr5":["2014-07-02","2015-05-09"]}'
But I use the PROC HTTP failed.
proc http url="http://url/api/" method="POST" out=resp in=input;
headers "xxxxx"="xxxx";
debug level=3;
run;
The in=input have the "{"attr1":[1284,1296,1300,1426,1428],"attr2":[664,622,657],"attr3":[],"attr4":[],"attr5":["2014-07-02","2015-05-09"]}".
I tried to remove the "[" and "]", but still didn't work. Could someone help me?
Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!
Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.