1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-07-26 07:02:15 +03:00

allow String for payload in HTTPclient sendRequest

This commit is contained in:
Markus Sattler
2016-01-29 13:19:25 +01:00
parent bf067f718a
commit 27f1a63170
2 changed files with 11 additions and 0 deletions

View File

@ -305,6 +305,16 @@ int HTTPClient::POST(String payload) {
return POST((uint8_t *) payload.c_str(), payload.length());
}
/**
* sendRequest
* @param type const char * "GET", "POST", ....
* @param payload String data for the message body
* @return
*/
int HTTPClient::sendRequest(const char * type, String payload) {
return sendRequest(type, (uint8_t *) payload.c_str(), payload.length());
}
/**
* sendRequest
* @param type const char * "GET", "POST", ....