I finally was able to send data through the wifi network at my work, using my private tablet (Android). It works, when opening the Chrome browser (does not work with the standard internet browser though) and entering the path (storage/emulated/0/Documents/post.html) to my post.html file, which contains the following code:
<form action="https://api.thingspeak.com/update.json" method="post">
<p>
<label for="set temp">Desired Temperature: </label>
<input type="hidden" id="api_key" name="api_key" value="myAPIkey">
<input type="text" id="field1" name="field1"> <br>
<input type="submit" value="Send">
</p>
</form>
This opens a page that allows me to send data to my Thingspeak channel through the WLAN from my work place. It works fine.
However, the following code in the ESP8266, which works perfectly at home, doesn't work at my work place:
if (myClient.connect(server,80)){
String postStr = apiKey;
postStr += "&field1=";
postStr += String(temperature);
lastSentTemperature = temperature;
postStr += "&field2=";
postStr += String(humidity);
postStr += "\r\n\r\n";
myClient.print("POST /update HTTP/1.1\n");
myClient.print("Host: api.thingspeak.com\n");
myClient.print("Connection: close\n");
myClient.print("X-THINGSPEAKAPIKEY:" + apiKey +"\n");
myClient.print("Content-Type: application/x-www-form-urlencoded\n");
myClient.print("Content-Length: ");
myClient.print(postStr.length());
myClient.print("\n\n");
myClient.print(postStr);
}
Any idea what could be wrong?
Thanks, Dan
@schufti: With that information, do you think that may still be a proxy problem? You may have pointed my into the right direction. I just don't know what to do with that proxy thing, and how to solve it.