I'm fighting to make work the Web response. I always have the "Error 1101: Unable to get..."
I'm using my cellphone, with the AI Companin option. Not the emulator.
I also receive the Get action from the Web component.
So I don't know what to try. I'm connected in the same Wifi network, and I know the code in server is fine because it answer fast the get from the browser and Web.Viewer.
@vknow360: I tried with Google.com and the Web1 receive the info perfectly. So the issue is on WebServer side.
@Juan_Antonio: I will try that, but in the last test I remove the if to answer date info, always. And it didn't work. My ESP8266: ESP01S.
Your example is with an 8288, I'm not using any ESP8266.Wifi library
I believe I have to answer in a different ways if it's WebViewer and a differente way if its Web. Because answering the same way to both, Get it's not working.
I was able to make it work!
the issue was regarding the answer structure. I change to this and it started working good:
// HTTP Header
httpHeader = "HTTP/1.1 200 OK\r\nContent-Type: text/html; charset=UTF-8\r\n";
httpHeader += "Content-Length: ";
httpHeader += content.length();
httpHeader += "\r\n";
httpHeader +="Connection: close\r\n\r\n";
httpResponse = httpHeader + content + " "; // There is a bug in this code: the last character of "content" is not sent, I cheated by adding this extra space
sendData ("AT+CIPSEND=" + String(connectionId) + "," + httpResponse.length() + "\r\n", 500, true);
sendData (httpResponse,1000,true);
//sendData ("AT+CIPCLOSE=" + String(connectionId) + "\r\n", 1000, true);