Fixed custom headers and Basic authorization, added support for redirection, functional file download interface can be used for SW updates and more.

Dependents:   Sample_HTTPClient Sample_HTTPClient LWM2M_NanoService_Ethernet LWM2M_NanoService_Ethernet ... more

Fork of HTTPClient by Vincent Wochnik

More recent changes - added iCal processing.

Derivative of a derivative, however this one works when it comes to supplying Basic authorization to access a protected resource. Some additional changes to the debug interface to clean it up for consistency with many other components I have.

Files at this revision

API Documentation at this revision

Comitter:
WiredHome
Date:
Sat Jul 29 14:05:52 2017 +0000
Parent:
43:12a6ae712bcd
Child:
45:accd09953fae
Commit message:
Minor changes to integrate SW Memory manager.

Changed in this revision

HTTPClient.cpp Show annotated file Show diff for this revision Revisions of this file
data/HTTPiCal.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/HTTPClient.cpp	Thu Jul 20 10:56:03 2017 +0000
+++ b/HTTPClient.cpp	Sat Jul 29 14:05:52 2017 +0000
@@ -554,11 +554,13 @@
     int ret;
     while (readLen < maxLen) {
         if (readLen < minLen) {
-            DBG("Trying to read at most %4d bytes [Blocking] %d,%d", minLen - readLen, minLen, readLen);
+            DBG("Trying to read at most %4d bytes [not Blocking, %d] %d,%d", minLen - readLen, 
+                m_timeout, minLen, readLen);
             m_sock.set_blocking(false, m_timeout);
             ret = m_sock.receive_all(buf + readLen, minLen - readLen);
         } else {
-            DBG("Trying to read at most %4d bytes [Not blocking] %d,%d", maxLen - readLen, maxLen, readLen);
+            DBG("Trying to read at most %4d bytes [Not blocking, %d] %d,%d", maxLen - readLen, 
+                0, maxLen, readLen);
             m_sock.set_blocking(false, 0);
             ret = m_sock.receive(buf + readLen, maxLen - readLen);
         }
--- a/data/HTTPiCal.cpp	Thu Jul 20 10:56:03 2017 +0000
+++ b/data/HTTPiCal.cpp	Sat Jul 29 14:05:52 2017 +0000
@@ -198,7 +198,7 @@
 #define NumCallsPerArgList 2
 char * HTTPiCal::FormatCTime(time_t t)
 {
-    static char temp[NumCallsPerArgList][80];
+    static char temp[NumCallsPerArgList][30];
     static int i = 0;
 
     i %= NumCallsPerArgList;