Fork HTTPClient and Modfiy code for mbed 6.0
Dependents: mbed-demo-http-get-json
Diff: HTTPClient.h
- Revision:
- 50:1c1409029b05
- Parent:
- 49:c5abb7ae070b
--- a/HTTPClient.h Sun Jul 14 01:42:33 2019 +0000 +++ b/HTTPClient.h Sun Nov 08 02:49:01 2020 +0000 @@ -24,9 +24,9 @@ #ifndef HTTP_CLIENT_H #define HTTP_CLIENT_H -#include "TCPSocketConnection.h" +//#include "TCPSocketConnection.h" //delete for mbed 6.0 -#define HTTP_CLIENT_DEFAULT_TIMEOUT 15000 +#define HTTP_CLIENT_DEFAULT_TIMEOUT 5000 class HTTPData; @@ -57,7 +57,8 @@ { public: ///Instantiate the HTTP client - HTTPClient(); + //HTTPClient(); + HTTPClient(NetworkInterface *interface);// modify for mbed 6.0 ~HTTPClient(); /// Get the text form of the error number @@ -186,8 +187,10 @@ int base64enc(const char *input, unsigned int length, char *output, int len); //Parameters - TCPSocketConnection m_sock; - + //TCPSocketConnection m_sock; + NetworkInterface *net; //add for mbed 6.0 + TCPSocket m_sock; // modify for mbed 6.0 + nsapi_size_or_error_t tcp_connected; //add for mbed 6.0 int m_timeout; char* m_basicAuthUser;