SIM908- Hybrid HTTP request without get data


#1

Hi, I´m fernando
first, Sorry by my poor english.

I try to send this HYBRID WRITE/READ HTTP request with a
microcontroller and GSM module SIM908 with the data value for apparent=xxx , and request the value of the variable crankcase.
what I 'm doing wrong?
(I have previously made a successful Hybrid HTTP request, But now in this application I can´t see the problem)

POST /api:v1/stack/alias?crankcase HTTP/1.1[CR][LF]
Host: m2.exosite.com[CR][LF]
X-Exosite-CIK: xxxxxxxxxxxxxxxxxxx[CR][LF]
Content-Type: application/x-www-form-urlencoded; charset=utf-8[CR][LF]
Content-Length: 12[CR][LF]
[CR][LF]
apparent=555

HTTP/1.1 204 No Content
Server: nginx/1.6.2 (Ubuntu)
Date: Thu, 21
May 2015 23:17:34 GMT
Content-Length: 0
Connection: keep-alive


#2

Hi Fernando,

It looks like you’re missing the Accept header from that request. See http://docs.exosite.com/http/#hybrid-writeread

You need to add a header line that says Accept: application/x-www-form-urlencoded; charset=utf-8 and it should work.


#3

Patrick,

I add the missing header and and works ok!

Thank again.! (excellent support, even silly questions ).


#4

Patrick,

I add the missing header and and works ok!

Thank again.! (excellent support, even silly questions ).