The use of the ESP8266 in the world of IoT

User avatar
By happygneddu
#3535 Hello guys, i have a problem with pushingbox request.
The steps that follow are (with the terminal) :
connection to the server with command AT+CIPSTART="TCP","api.pushingbox.com",80
send request with AT+CIPSEND=79 and after GET /pushingbox?devid=my devid HTTP/1.1\r\nHost: pushingbox.com\r\n\r\n
The answer is :

SEND OK

OK
Unlink

But the notification does not arrive.
Someone can help me??
Thanks a lot.
User avatar
By happygneddu
#3718 UPDATES :

using this request : POST https://api.pushingbox.com/pushingbox?devid=mydevid HTTP/1.0 or GET https://api.pushingbox.com/pushingbox?devid=mydevid HTTP/1.0
following by 2 return, the answer is :

SEND OK

+IPD,809:HTTP/1.1 200 OK
Set-Cookie: 60gpBAK=R1224225179; path=/; expires=Mon, 01-Dec-2014 18:00:29 GMT
Server: nginx
Date: Mon, 01 Dec 2014 16:52:40 GMT
Content-Type: text/html; charset=utf8
Connection: close
content-length: 463
pragma: no-cache
cache-control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
connection: close

<HTML><HEAD><TITLE>webmail http://webmail.ovh.net</TITLE>
<META NAME="Description" CONTENT="description de votre site">
<META NAME="KeyWords" CONTENT="les mots ">
</HEAD>
<FRAMESET rows="100%,*" frameborder=no border=0>
<!-- mettez le lien de votre choix -->
<FRAME SRC="http://webmail.ovh.net">
<FRAME SRC="" scrolling="No" noresize>
</FRAMESET>
<NOFRAME>
<BODY>
<a href="http://webmail.ovh.net">Cliquez ici pour votre redirection</a>
</BODY>
</NOFRAME>
</HTML>

OK

OK
Unlink

But the notification does not arrive. WHY????
everything looks correct but .... :-(
PS the firmware version is 0018000902
User avatar
By Tomer
#3845 When you are surfing to this url using your browser are you getting the notification?
Try adding a User-Agent header to the request (the one you are sending with the esp).
User avatar
By maciel310
#3881 I noticed 2 things with your requests: first, you're URLs start with https:// when they should start with http:// (https is a significantly more complicated protocol which you aren't using). The other thing is you likely need to provide a Host header. It looks like pushingbox is on a shared hosting provider, and the webserver will use the host header to determine which client to route your request to. Your HTTP request should look something like this:

GET /pushingbox?devid=mydevid HTTP/1.1
Host: api.pushingbox.com


Note that is untested, but I believe it should work.