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:
38:2ef07232f65c
Child:
42:ab259a9d1d36
--- a/HTTPClient.cpp	Tue Mar 14 02:59:32 2017 +0000
+++ b/HTTPClient.cpp	Sun Apr 16 20:55:07 2017 +0000
@@ -17,7 +17,7 @@
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  */
 
-//#include "Utility.h"            // private memory manager
+#include "Utility.h"            // private memory manager
 #ifndef UTILITY_H
 #define swMalloc malloc         // use the standard
 #define swFree free
@@ -62,6 +62,10 @@
 
 HTTPClient::~HTTPClient()
 {
+    if (m_basicAuthUser)
+        swFree(m_basicAuthUser);
+    if (m_basicAuthPassword)
+        swFree(m_basicAuthPassword);
     if (m_location) // if any redirection was involved, clean up after it.
         swFree(m_location);
     m_location = NULL;      // this step isn't necessary...