The use of the ESP8266 in the world of IoT

User avatar
By happygneddu
#3916 Yes, if use this url : http://api.pushingbox.com/pushingbox?devid=mydevid with browser, the notification arrive.
I have tried to send : POST http://api.pushingbox.com/pushingbox?devid=mydevid HTTP/1.0\r\nUser-Agent: ESP8266
but the answer is only :
SEND OK

OK
Unlink
and the notification does not arrive...
User avatar
By happygneddu
#3928 marciel310 you are right. https and http is not the same but the response is equal.
I tried to send GET /pushingbox?devid=mydevid HTTP/1.1\r\nHost: api.pushingbox.com or GET /pushingbox?devid=mydevid HTTP/1.0\r\nHost: api.pushingbox.com and the response is :
SEND OK

OK
Unlink
nothing else and the notification does not arrive :x :x
The only times I get response are when send GET http://api.pushingbox.com/pushingbox?devid=mydevid HTTP/1.0
and the response is like the second post...
The problem may be in the number of characters that send ?
User avatar
By Tomer
#3930
happygneddu wrote:marciel310 you are right. https and http is not the same but the response is equal.
I tried to send GET /pushingbox?devid=mydevid HTTP/1.1\r\nHost: api.pushingbox.com or GET /pushingbox?devid=mydevid HTTP/1.0\r\nHost: api.pushingbox.com and the response is :
SEND OK

OK
Unlink
nothing else and the notification does not arrive :x :x
The only times I get response are when send GET http://api.pushingbox.com/pushingbox?devid=mydevid HTTP/1.0
and the response is like the second post...
The problem may be in the number of characters that send ?


Like maciel said, looks like its shared hosting, so your request should must include a host header, it should look something like this:

GET /pushingbox?devid=<YOURDEVID> HTTP/1.1\r\nHost: api.pushingbox.com\r\nUser-Agent: ESP8266\r\n\r\n

** Just make sure that you are replacing <YOURDEVID> with your correct dev id, and that you are calculating the correct length