Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* Doing all these steps to make the request
- AT+RST
- AT+CWMODE=1
- AT+CWJAP="MyNetwork","MyPassword"
- AT+CIPMUX=1
- AT+CIPSTART=0,"TCP","myserver.com.br",80
- AT+CIPSEND=0,270
- */
- String command = "POST /webservice/v1/dispositivo/atualizar_data_requisicao HTTP/1.1rn";
- comando += "Host: " + SERVER + "rn";
- comando += "User-Agent: Arduino/1.0rn";
- comando += "Connection: Closern";
- comando += "Content-Type: application/x-www-form-urlencoded;rn";
- comando += "Content-Length: " + String(data.length()) + "rnrn";
- comando += data;
- esp8266.println(command);
- delay(2000);
- String response;
- while(esp8266.available()) {
- response += esp8266.readStringUntil('r');
- }
- Serial.print("Request response: ");
- Serial.println(response);
- Recv 270 bxt⸮⸮C⸮
- SEND OK
- +IPD,0.569:HTTP/1.0 200 OK
Add Comment
Please, Sign In to add comment