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.

Revision:
41:37e7df011c1f
Parent:
40:bcb19f8dbba3
Child:
42:ab259a9d1d36
--- a/data/HTTPiCal.cpp	Tue Mar 14 02:59:32 2017 +0000
+++ b/data/HTTPiCal.cpp	Sun Apr 16 20:55:07 2017 +0000
@@ -1,5 +1,11 @@
 #include "HTTPiCal.h"
 
+#include "Utility.h"            // private memory manager
+#ifndef UTILITY_H
+#define swMalloc malloc         // use the standard
+#define swFree free
+#endif
+
 //#define DEBUG "iCal"
 #include <cstdio>
 #if (defined(DEBUG) && !defined(TARGET_LPC11U24))
@@ -15,7 +21,7 @@
 #endif
 
 HTTPiCal::HTTPiCal(int count) {
-    EventList = (Event_T *)malloc(count * sizeof(Event_T));
+    EventList = (Event_T *)swMalloc(count * sizeof(Event_T));
     if (EventList) {
         EventSpaceCount = count;
         EventCount = 0;
@@ -27,7 +33,7 @@
 
 HTTPiCal::~HTTPiCal() {
     if (EventList)
-        free(EventList);
+        swFree(EventList);
 }
 
 void HTTPiCal::SetTimeWindow(time_t StartTime, time_t EndTime) {