diff --git a/src/protocols/HTTP.cpp b/src/protocols/HTTP.cpp index 8a5cce8b..35a52f2a 100644 --- a/src/protocols/HTTP.cpp +++ b/src/protocols/HTTP.cpp @@ -5,6 +5,10 @@ HTTPClient::HTTPClient(TransportLayer* tl, uint16_t port) { _port = port; } +int16_t HTTPClient::get(String& url, String& response) { + return(HTTPClient::get(url.c_str(), response)); +} + int16_t HTTPClient::get(const char* url, String& response) { // get the host address and endpoint char* httpPrefix = strstr(url, "http://"); diff --git a/src/protocols/HTTP.h b/src/protocols/HTTP.h index e3d1293f..c689a89c 100644 --- a/src/protocols/HTTP.h +++ b/src/protocols/HTTP.h @@ -10,6 +10,7 @@ class HTTPClient { HTTPClient(TransportLayer* tl, uint16_t port = 80); // basic methods + int16_t get(String& url, String& response); int16_t get(const char* url, String& response); int16_t post(const char* url, const char* content, String& response, const char* contentType = "text/plain");