Experimental HTTP and HTTPS library for mbed OS 5

Files at this revision

API Documentation at this revision

Comitter:
Jan Jongboom
Date:
Tue Mar 27 11:07:02 2018 +0200
Parent:
27:42b319540a74
Parent:
26:fe4e03a404fb
Child:
29:383e9bfbfbed
Child:
31:b3730a2c4f39
Commit message:
Merge default

Changed in this revision

--- a/README.md	Tue Mar 27 11:05:43 2018 +0200
+++ b/README.md	Tue Mar 27 11:07:02 2018 +0200
@@ -41,6 +41,8 @@
 delete request;
 ```
 
+**Note:** You can get the root CA for a domain easily from Firefox. Click on the green padlock, click *More information > Security > View certificate > Details*. Select the top entry in the 'Certificate Hierarchy' and click *Export...*. This gives you a PEM file. Add the content of the PEM file to your root CA list ([here's an image](img/root-ca-selection.png)).
+
 ## Memory usage
 
 Small requests where the body of the response is cached by the library (like the one found in main-http.cpp), require ~4K of RAM. When the request is finished they require ~1.5K of RAM, depending on the size of the response. This applies both to HTTP and HTTPS. If you need to handle requests that return a large response body, see 'Dealing with large body'.
Binary file img/root-ca-selection.png has changed
--- a/source/http_request_builder.h	Tue Mar 27 11:05:43 2018 +0200
+++ b/source/http_request_builder.h	Tue Mar 27 11:07:02 2018 +0200
@@ -87,9 +87,6 @@
         if (!is_chunked) {
             // body
             size += body_size;
-
-            // extra newline
-            size += 2;
         }
 
         // Now let's print it
@@ -118,11 +115,6 @@
         }
         req += body_size;
 
-        if (!is_chunked) {
-            sprintf(req, "\r\n");
-            req += 2;
-        }
-
         // Uncomment to debug...
         // printf("----- BEGIN REQUEST -----\n");
         // printf("%s", originalReq);