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:
24:eee214e3e806
Parent:
23:517fec8b8b99
Child:
30:1df62fedb13b
--- a/HTTPClient.h	Sat Mar 15 18:40:29 2014 +0000
+++ b/HTTPClient.h	Sat Mar 15 22:18:30 2014 +0000
@@ -147,6 +147,19 @@
     */
     int getHTTPResponseCode();
 
+    /** Set the maximum number of automated redirections
+    @param i is the number of redirections. Values < 1 are
+        set to 1.
+    */
+    void setMaxRedirections(int i = 1);
+
+    /** get the redirect location url
+    @returns const char pointer to the url.
+    */
+    const char * getLocation() {
+        return m_location;
+    }
+
 private:
     enum HTTP_METH {
         HTTP_GET,
@@ -173,6 +186,8 @@
     const char** m_customHeaders;
     size_t m_nCustomHeaders;
     int m_httpResponseCode;
+    int m_maxredirections;
+    char * m_location;
 
 };