HTTP/HTTPS Client Library for the X-NUCLEO-IDW01M1v2 wifi board.
Dependents: HTTPClient_HelloWorld_IDW01M1 wifigianluigi HTTPClient_HelloWorld_IDW01M1_Fabio_Ricezione
Fork of HTTPClient by
Diff: HTTPClient.h
- Revision:
- 21:6e5c122ad9e5
- Parent:
- 19:17578cfdb57a
- Child:
- 22:ae30428dc030
--- a/HTTPClient.h Tue Nov 08 17:21:42 2016 +0000 +++ b/HTTPClient.h Fri Nov 11 16:13:48 2016 +0000 @@ -24,8 +24,11 @@ #ifndef HTTP_CLIENT_H #define HTTP_CLIENT_H +//#include "TCPSocket.h" +//#include "HTTPWifi.h" +#include "NetworkStack.h" #include "TCPSocket.h" -#include "HTTPWifi.h" +#include "SpwfInterface.h" #define LICIO #define HTTP_CLIENT_DEFAULT_TIMEOUT 15000 @@ -62,7 +65,8 @@ { public: ///Instantiate the HTTP client - HTTPClient(HTTPWiFi & _m_sock); + HTTPClient(NetworkStack & _m_intf); + ~HTTPClient(); #if 0 //TODO add header handlers @@ -146,15 +150,15 @@ 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 //Parameters - HTTPWiFi m_sock; - + NetworkStack & m_intf; // WiFi interface + TCPSocket m_sock; // TCP socket + int m_timeout; const char* m_basicAuthUser; const char* m_basicAuthPassword; int m_httpResponseCode; char buf[CHUNK_SIZE]; - }; //Including data containers here for more convenience