You've already forked ArduinoHttpClient
mirror of
https://github.com/arduino-libraries/ArduinoHttpClient.git
synced 2025-07-05 04:01:10 +03:00
Updated examples and readme.md
This commit is contained in:
@ -3,9 +3,8 @@
|
||||
Connects to server once every five seconds, sends a DELETE request
|
||||
and a request body
|
||||
|
||||
|
||||
|
||||
created 14 Feb 2016
|
||||
modified 22 Jan 2019
|
||||
by Tom Igoe
|
||||
|
||||
this example is in the public domain
|
||||
@ -27,8 +26,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);
|
||||
@ -58,8 +55,8 @@ void loop() {
|
||||
client.del("/", contentType, delData);
|
||||
|
||||
// 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