Fork of SandBox's original mbed-http (https://os.mbed.com/teams/sandbox/code/mbed-http/) and update for MbedOS6+ Content of TESTS folder was replaced with basic examples form original SandBox's HelloWorld
Diff: source/http_request.h
- Revision:
- 40:6ecb52cd17d9
- Parent:
- 37:98d83ca14b7b
--- a/source/http_request.h Mon Aug 12 11:45:31 2019 +0200 +++ b/source/http_request.h Sat May 29 18:34:24 2021 +0000 @@ -62,6 +62,8 @@ _socket = new TCPSocket(); ((TCPSocket*)_socket)->open(network); + network->gethostbyname(_parsed_url->host(), &address); + address.set_port(_parsed_url->port()); _we_created_socket = true; } @@ -92,8 +94,8 @@ protected: - virtual nsapi_error_t connect_socket(char *host, uint16_t port) { - return ((TCPSocket*)_socket)->connect(host, port); + virtual nsapi_error_t connect_socket(SocketAddress addr) { + return ((TCPSocket*)_socket)->connect(addr); } };