1
0
mirror of https://github.com/arduino-libraries/ArduinoHttpClient.git synced 2025-06-11 17:08:08 +03:00

Add new beginBody API

This commit is contained in:
Sandeep Mistry
2017-03-28 14:12:20 -04:00
parent 2394bbb7cd
commit 448a1520c8
4 changed files with 15 additions and 1 deletions

View File

@ -58,8 +58,9 @@ void loop() {
client.sendHeader("Content-Type", "application/x-www-form-urlencoded");
client.sendHeader("Content-Length", postData.length());
client.sendHeader("X-Custom-Header", "custom-header-value");
client.endRequest();
client.beginBody();
client.print(postData);
client.endRequest();
// read the status code and body of the response
statusCode = client.responseStatusCode();