You've already forked ArduinoHttpClient
mirror of
https://github.com/arduino-libraries/ArduinoHttpClient.git
synced 2025-06-11 17:08:08 +03:00
Add new del API for HTTP DELETE method
This commit is contained in:
@ -50,14 +50,10 @@ void setup() {
|
||||
|
||||
void loop() {
|
||||
Serial.println("making DELETE request");
|
||||
String contentType = "application/x-www-form-urlencoded";
|
||||
String delData = "name=light&age=46";
|
||||
|
||||
client.beginRequest();
|
||||
client.startRequest("/", HTTP_METHOD_DELETE);
|
||||
client.sendHeader("Content-Type", "application/x-www-form-urlencoded");
|
||||
client.sendHeader("Content-Length", delData.length());
|
||||
client.endRequest();
|
||||
client.write((const byte*)delData.c_str(), delData.length());
|
||||
client.del("/", contentType, delData);
|
||||
|
||||
// read the status code and content length of the response
|
||||
statusCode = client.responseStatusCode();
|
||||
|
Reference in New Issue
Block a user