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
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 49:c5abb7ae070b, committed 2019-07-14
- Comitter:
- WiredHome
- Date:
- Sun Jul 14 01:42:33 2019 +0000
- Parent:
- 48:61c26e0111c9
- Commit message:
- Correct an api parameter type.
Changed in this revision
HTTPClient.cpp | Show annotated file Show diff for this revision Revisions of this file |
HTTPClient.h | Show annotated file Show diff for this revision Revisions of this file |
--- a/HTTPClient.cpp Wed Apr 03 22:00:31 2019 +0000 +++ b/HTTPClient.cpp Sun Jul 14 01:42:33 2019 +0000 @@ -588,7 +588,7 @@ return HTTP_OK; } -HTTPResult HTTPClient::send(const char* buf, size_t len) //0 on success, err code on failure +HTTPResult HTTPClient::send(char* buf, size_t len) //0 on success, err code on failure { if(len == 0) { len = strlen(buf);
--- a/HTTPClient.h Wed Apr 03 22:00:31 2019 +0000 +++ b/HTTPClient.h Sun Jul 14 01:42:33 2019 +0000 @@ -180,7 +180,7 @@ HTTPResult connect(const char* url, HTTP_METH method, IHTTPDataOut* pDataOut, IHTTPDataIn* pDataIn, int timeout); //Execute request HTTPResult recv(char* buf, size_t minLen, size_t maxLen, size_t* pReadLen); //0 on success, err code on failure - HTTPResult send(const char* buf, size_t len = 0); //0 on success, err code on failure + HTTPResult send(char* buf, size_t len = 0); //0 on success, err code on failure HTTPResult parseURL(const char* url, char* scheme, size_t maxSchemeLen, char* host, size_t maxHostLen, uint16_t* port, char* path, size_t maxPathLen); //Parse URL void createauth (const char *user, const char *pwd, char *buf, int len); int base64enc(const char *input, unsigned int length, char *output, int len);