I will try to explain what i would like to to .
Fisrt , i have a ssid setting sheet wich is called and store on esp8266/data/ssid_connect.html
When i display this sheet, i enter ssid and password and send my form (post) to esp8266/
server.on ( "/ssid_connect.html", handleTest );
void handleTest() {
String tmp;
tmp += "<HTML><HEAD><TITLE>WiWiRe VALIDATION</TITLE>";
tmp += "<script>function redirForm() {document.myform.action = '/data/ssid_connect.html';document.myform.submit();}</script>";
tmp += "</HEAD><BODY onLoad='redirForm()'>";
tmp += "<FORM NAME='myform' METHOD='POST'>";
tmp += "<INPUT TYPE='hidden' NAME='email' VALUE='youpi@free.fr'>";
tmp += "<INPUT TYPE='hidden' NAME='password' VALUE='passyoupi'>";
tmp += "</FORM></BODY></HTML>";
server.send ( 200, "text/html", tmp );
}
i know i can get post value with this kind of code :
String message = "File Not Found\n\n";
message += "URI: ";
message += server.uri();
message += "\nMethod: ";
message += ( server.method() == HTTP_GET ) ? "GET" : "POST";
message += "\nArguments: ";
message += server.args();
message += "\n";
for ( uint8_t i = 0; i < server.args(); i++ ) {
message += " " + server.argName ( i ) + ": " + server.arg ( i ) + "\n";
}
NOW, i would like , in handleTest, to display again /data/ssid_connect.html , with fill in all data i already received.
But i am not agree with using get method form.
Have you any kind of idea to do this, and, is this possible ?
Windows 10
Arduino IDE 1.6.13
ESP8266 2.3-RC-2 + git ESP8266 core