Added PATCH request. (#2610)

This commit is contained in:
Matthias Budde 2019-04-09 21:22:47 +02:00 committed by Me No Dev
parent dd649808d1
commit 92220b7643
2 changed files with 18 additions and 0 deletions

View File

@ -483,6 +483,22 @@ int HTTPClient::POST(String payload)
return POST((uint8_t *) payload.c_str(), payload.length());
}
/**
* sends a patch request to the server
* @param payload uint8_t *
* @param size size_t
* @return http code
*/
int HTTPClient::PATCH(uint8_t * payload, size_t size)
{
return sendRequest("PATCH", payload, size);
}
int HTTPClient::PATCH(String payload)
{
return PATCH((uint8_t *) payload.c_str(), payload.length());
}
/**
* sends a put request to the server
* @param payload uint8_t *

View File

@ -160,6 +160,8 @@ public:
/// request handling
int GET();
int PATCH(uint8_t * payload, size_t size);
int PATCH(String payload);
int POST(uint8_t * payload, size_t size);
int POST(String payload);
int PUT(uint8_t * payload, size_t size);