1
0
mirror of https://github.com/arduino-libraries/ArduinoHttpClient.git synced 2025-06-11 17:08:08 +03:00

Updated examples and readme.md

This commit is contained in:
tigoe
2019-01-22 08:02:55 -05:00
committed by Sandeep Mistry
parent b6424e430d
commit 5e1f1f21bf
12 changed files with 39 additions and 79 deletions

View File

@ -3,12 +3,12 @@
Connects to server once every five seconds, sends a POST request
with custome headers and a request body
created 14 Feb 2016
by Tom Igoe
modified 18 Mar 2017
by Sandeep Mistry
modified 22 Jan 2019
by Tom Igoe
this example is in the public domain
*/
@ -29,8 +29,6 @@ int port = 8080;
WiFiClient wifi;
HttpClient client = HttpClient(wifi, serverAddress, port);
int status = WL_IDLE_STATUS;
String response;
int statusCode = 0;
void setup() {
Serial.begin(9600);
@ -66,8 +64,8 @@ void loop() {
client.endRequest();
// read the status code and body of the response
statusCode = client.responseStatusCode();
response = client.responseBody();
int statusCode = client.responseStatusCode();
String response = client.responseBody();
Serial.print("Status code: ");
Serial.println(statusCode);