Hello,
can someone please point me in the right direction. I have created a REST web service with accepts XML input. I now would like to change this to JSON. However I am having difficulty specifying this in the Stored Process Data screen. Is this the correct method?
When I run the following code, I get a Bad Request message as response. Any help would be be very much appreciated!
filename input TEMP;
data _null_;
file input;
input;
put _infile_;
datalines;
{ "name":"value" }
run;
proc http
url="http://blah.com/SASBIWS/rest/storedProcesses/Products/SAS Intelligence Platform/Samples/stp_04_json_json"
in=input
out=resp username=xxx" password="xxx" ;
headers "Content-Type"="application/json" "Accept"="application/json";
run;
when looking at the following documentation it would appear to be possible -
however I continue to receive a bad request when specifiying the JSON in the documented manner.
Hi @RichardP -
To me it looks like you are doing this correctly. But maybe @Vince_SAS has some ideas of what you can check.
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!
Still thinking about your presentation idea? The submission deadline has been extended to Friday, Nov. 14, at 11:59 p.m. ET.
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.