I am trying to make a post request to an API. I used to following code filename json_in "~/API/krl/send.json" encoding='utf-8';
filename resp "~/API/krl/krlkrlTest.json" encoding='wlatin2';
data _null_;
file json_in;
input;
put _infile_;
datalines;
"apiKey": "<Key removed>",
"table": "Personale-måned",
"time": [
{
"y1": "2019",
"m1": "11"
}
],
"control": [
"niv0"
],
"data": [
"fuldtid",
"hoveder"
],
"selection": [
{
"name": "Udvalgte population",
"filters": {
"tre": [
"084"
],
"trs": [
"27601",
"22201"
],
"tra": [
"1",
"2"
],
"afl": [
"0",
"1"
]
}
}
],
"options": {
"totals": False,
"outputFormat": "json",
"actions": [],
"tableName": "Antal ansatte",
"subLimit": 0,
"modelName": "Lokale Løndata",
"timeIncreasing": False,
"salary": [
"gl",
"ct",
"tck",
"tcf",
"tcg",
"tco",
"tca",
"lt",
"tlk",
"tlf",
"tlg",
"tlr",
"tla",
"er",
"sy",
"sf",
"pb",
"tj",
"tle",
"tci",
"pbb",
"pbt"
]
}
}
run;
proc http
method="POST"
url="https://www.krl.dk/sirka/sirkaApi/tableApi"
ct="application/json"
in=json_in
out=resp;
debug level=3;
run; I always get the error ERROR: EOF returned before expected I run the same request in python and everything works fine. Any ideas?
... View more