Hello,
I want to upload my S0-pulse data to Pvoutput.org.
It works with a testscript in a shell-file, using “curl” from the command line.
But the goal is to put it in a c-program linked with libcurl.
In this case, with the same kind of request, a get as reply:
“Unauthorized 401: Invalid System ID”
The working shell command:
curl -d “d=20180130” -d “t=10:15” -d “v1=1000” -d “v2=150” -H “X-Pvoutput-Apikey:MyApi” -H “X-Pvoutput-SystemId:MyId” https://pvoutput.org/service/r2/addstatus.jsp
The c-program posts this string:
static const char *postthis = “-d “d=20180130” -d “t=10:05” -d “v1=1000” -d “v2=150” -H “X-Pvoutput-Apikey:MyApi” -H “X-Pvoutput-SystemId:MyId””;
A printf of this string gives:
-d “d=20180130” -d “t=10:05” -d “v1=1000” -d “v2=150” -H “X-Pvoutput-Apikey:MyApi” -H “X-Pvoutput-SystemId:MyApi”
(I deleted the Id’s in this forumpost)
libcurl returns with success. But the message from Pvoutput.org is not good.
“Unauthorized 401: Invalid System ID”
What can be wrong ?