-->
Page 1 of 1

Post / GET not working

PostPosted: Sat Jan 02, 2016 1:54 pm
by Ben_1983
Hi
We are trying to call a web service using GET or POST. It is working only for api.thingspeak.com, and not for my custom service. I tried sending these commands:

AT+CIPSTART="TCP","www.mydomain.com",80
AT+CIPSEND=15
GET /test.php

and I get file not found error. Where as, when I do my domain.com/test.php on the browser, the file does exist and I get a response. What is strange is - if I replace this with api.thingspeak.com and use there GET /update?API_KEY ..etc. that works.

Appreciate your help.
Ben

Re: Post / GET not working

PostPosted: Mon Jan 04, 2016 4:50 pm
by eduperez
My first bet:

When your browser goes to "http://www.mydomain.com/test.php", the GET command that it send the server contains also the domain name, not just the "/test.php" part; depending on how is your server configured, that can cause a 404. To be sure, compare in your server logs what GET command is your browser sending, and copy it to your ESP.