A HTTP/HTTPS Client for the mbed networking/CyaSSL ssl library

Dependents:   Anpi dropbox_access php_access_auth TwitterReader ... more

Fork of HTTPClient by Donatien Garnier

HTTP and HTTPS Client Class with wolfSSL, embedded SSL library.

/media/uploads/wolfSSL/wolfssl_logo.png

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 */
Revision:
7:4e39864f7b15
Parent:
5:791fc3dcb6c4
Child:
10:e1351de84c16
--- a/HTTPClient.h	Fri Jun 29 10:24:38 2012 +0000
+++ b/HTTPClient.h	Fri Jun 29 11:05:21 2012 +0000
@@ -28,7 +28,7 @@
 #ifndef HTTP_CLIENT_H
 #define HTTP_CLIENT_H
 
-#include "bsd_socket.h"
+#include "TCPSocket.h"
 
 #define HTTP_CLIENT_DEFAULT_TIMEOUT 4000
 
@@ -124,15 +124,14 @@
   int parseURL(const char* url, char* scheme, size_t maxSchemeLen, char* host, size_t maxHostLen, uint16_t* port, char* path, size_t maxPathLen); //Parse URL
 
   //Parameters
-  int m_sock;
+  TCPSocket m_sock;
+  
   uint32_t m_timeout;
 
   const char* m_basicAuthUser;
   const char* m_basicAuthPassword;
   int m_httpResponseCode;
 
-  struct sockaddr_in m_serverAddr;
-
 };
 
 //Including data containers here for more convenience