HTTP and HTTPS library for Mbed OS 5

Dependents:   RZ_A2M_Mbed_samples_20201012 RZ_A2M_Mbed_samples

Revision:
32:fa4d71265625
Parent:
29:383e9bfbfbed
Parent:
31:b3730a2c4f39
Child:
35:b3ee394d1d2e
--- a/source/http_request_builder.h	Thu Sep 06 14:01:09 2018 -0500
+++ b/source/http_request_builder.h	Tue Oct 30 11:02:12 2018 +0800
@@ -58,14 +58,14 @@
         }
     }
 
-    char* build(const void* body, unsigned int body_size, uint32_t &size, bool skip_content_length = false) {
+    char* build(const void* body, uint32_t body_size, uint32_t &size, bool skip_content_length = false) {
         const char* method_str = http_method_str(method);
 
         bool is_chunked = has_header("Transfer-Encoding", "chunked");
 
         if (!is_chunked && (method == HTTP_POST || method == HTTP_PUT || method == HTTP_DELETE || body_size > 0)) {
             char buffer[10];
-            snprintf(buffer, 10, "%d", body_size);
+            snprintf(buffer, 10, "%lu", body_size);
             set_header("Content-Length", string(buffer));
         }