diff --git a/RestClient.cpp b/RestClient.cpp index 7afd641..d8b6cc7 100644 --- a/RestClient.cpp +++ b/RestClient.cpp @@ -130,7 +130,7 @@ int RestClient::request(const char* method, const char* path, if(body != NULL){ char contentLength[30]; - sprintf(contentLength, "Content-Length: %d\r\n", strlen(body)); + sprintf(contentLength, "Content-Length: %d\r\n", strlen(body)+1); //The code below sends an extra CRLF write(contentLength); write("Content-Type: ");