You've already forked ArduinoHttpClient
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:
@ -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);
|
||||
|
Reference in New Issue
Block a user