Our full technical support staff does not monitor this forum. If you need assistance from a member of our staff, please submit your question from the Ask a Question page.


Log in or register to post/reply in the forum.

what is suggestion for free data cloud service which can be used by cr6 (http post, get commands)


mortenx Jul 20, 2018 08:02 AM

what are your recommendations for free data cloud service when you have little data, about sample a day


mortenx Jul 23, 2018 08:10 PM

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


mortenx Jul 25, 2018 08:58 AM

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 ?


Kevin_Hicks Aug 4, 2018 11:00 AM

Its really knowledgeable thread. Thanks for the solution buddy. 

Log in or register to post/reply in the forum.