A HTTP/HTTPS Client for the mbed networking/CyaSSL ssl library
Dependents: Anpi dropbox_access php_access_auth TwitterReader ... more
Fork of HTTPClient by
HTTP and HTTPS Client Class with wolfSSL, embedded SSL library.
The class was forked from http://mbed.org/users/donatien/code/HTTPClient/
It, now, accepts url both with "http://" and "https://".
Allocate caller thread with 16kbytes or larger stack for "https" requests.
Rest of the API stays compatible with HTTPClient.
For more about the library, see http://www.wolfssl.com. http://wolfssl.com/yaSSL/Docs.html.
Extended methods:
- HTTPResult basicAuth(const char* user, const char* password); /* set id/passwd for basic Authentication */
- void setHeader(char *header) ; /* set http headers */
- HTTPResult setSSLversion(int minorV) ; /* set SSL/TLS version. 0: SSL3, 1: TLS1.0, 2: TLS1.1, 3: TLS1.2 */
Diff: HTTPClient.cpp
- Revision:
- 1:b70c37cf73ca
- Parent:
- 0:2ccb9960a044
- Child:
- 2:75f5b83238af
diff -r 2ccb9960a044 -r b70c37cf73ca HTTPClient.cpp --- a/HTTPClient.cpp Thu Apr 26 13:04:56 2012 +0000 +++ b/HTTPClient.cpp Thu Apr 26 14:17:23 2012 +0000 @@ -154,6 +154,9 @@ return NET_CONN; } + size_t recvContentLength = 0; + bool recvChunked = false; + //Send all headers //Send default headers @@ -271,8 +274,6 @@ memmove(buf, &buf[crlfPos+2], trfLen - (crlfPos + 2)); trfLen -= (crlfPos + 2); - size_t recvContentLength = 0; - bool recvChunked = false; //Now get headers while( true ) { @@ -625,4 +626,3 @@ return OK; } -