BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
fanfanpao
Fluorite | Level 6

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?

1 ACCEPTED SOLUTION

Accepted Solutions
fanfanpao
Fluorite | Level 6
want to add onething, the response from server is incorrect parameter. so probably the problem should be the in=input values was not recognized well by the server.

View solution in original post

2 REPLIES 2
fanfanpao
Fluorite | Level 6
want to add onething, the response from server is incorrect parameter. so probably the problem should be the in=input values was not recognized well by the server.
fanfanpao
Fluorite | Level 6
No one knows?

SAS INNOVATE 2024

Innovate_SAS_Blue.png

Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.

If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website. 

Register now!

What is Bayesian Analysis?

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.

Get the $99 certification deal.jpg

 

 

Back in the Classroom!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 2 replies
  • 417 views
  • 0 likes
  • 1 in conversation