Fork HTTPClient and Modfiy code for mbed 6.0
Dependents: mbed-demo-http-get-json
Diff: HTTPClient.h
- 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; };