what are your recommendations for free data cloud service when you have little data, about sample a day
can you help me with exosites portal httppost function
https://support.exosite.com/hc/en-us/articles/200568243-Learning-about-HTTP-Requests
data to post must be like that :
POST /api:v1/stack/alias HTTP/1.1\r\n Host: m2.exosite.com\r\n X-Exosite-CIK: 27951d1a260b4b258fe......\r\n Content-Type: application/x-www-form-urlencoded; charset=utf-8\r\n Content-Length: 17\r\n \r\n data=1
in CRBasic code i use like that:
http_header ="POST /api:v1/stack/alias HTTP/1.1"+ CHR(13)+CHR(10)+ "Host: m2.exosite.com" + CHR(13)+CHR(10)+ "X-Exosite-CIK: aff431d5c65d23aef0b31e388bd280c8891" + CHR(13)+CHR(10)+ "Content-Type: application/x-www-form-urlencoded; charset=utf-8" + CHR(13)+CHR(10) + CHR(13)+CHR(10) data1="tilk1=1" HTTPPost ("m2.exosite.com",data1,http_post_response,http_header)
what i have done wrong ?
response is :Error: illegal url
ok it seems that header format was wrong
http_header ="http://m2.exosite.com/api:v1/stack/alias HTTP/1.1"+ CHR(13)+CHR(10)+ "Host: m2.exosite.com" + CHR(13)+CHR(10)+ "X-Exosite-CIK: aff431d5c65d23aef0b31e388bd280c889" + CHR(13)+CHR(10)+ "Content-Type: application/x-www-form-urlencoded; charset=utf-8" + CHR(13)+CHR(10) + CHR(13)+CHR(10)
but now is problem/error: {"detail": "JSON parse error - No JSON object could be decoded"}
how can i post json
{"value":10}
with httppost command ?
Its really knowledgeable thread. Thanks for the solution buddy.