Client for simple HTTP communication.
More...
#include <HTTP.h>
|
| HTTPClient (TransportLayer *tl, uint16_t port=80) |
| Default constructor. More...
|
|
int16_t | get (String &url, String &response) |
| Sends HTTP GET request. More...
|
|
int16_t | get (const char *url, String &response) |
| Sends HTTP GET request. More...
|
|
int16_t | post (const char *url, const char *content, String &response, const char *contentType="text/plain") |
| Sends HTTP POST request. More...
|
|
Client for simple HTTP communication.
◆ HTTPClient()
Default constructor.
- Parameters
-
tl | Pointer to the wireless module providing TransportLayer communication. |
port | Port to be used for HTTP. Defaults to 80. |
◆ get() [1/2]
int16_t HTTPClient::get |
( |
String & |
url, |
|
|
String & |
response |
|
) |
| |
Sends HTTP GET request.
- Parameters
-
url | URL to send the request to. |
response | Arduino String object that will save the response. |
- Returns
- Status Codes
◆ get() [2/2]
int16_t HTTPClient::get |
( |
const char * |
url, |
|
|
String & |
response |
|
) |
| |
Sends HTTP GET request.
- Parameters
-
url | URL to send the request to. |
response | Arduino String object that will save the response. |
- Returns
- Status Codes
◆ post()
int16_t HTTPClient::post |
( |
const char * |
url, |
|
|
const char * |
content, |
|
|
String & |
response, |
|
|
const char * |
contentType = "text/plain" |
|
) |
| |
Sends HTTP POST request.
- Parameters
-
url | URL to send the request to. |
content | Request content. |
response | Arduino String object that will save the response. |
contentType | MIME type of request content. Defaults to "text/plain". |
- Returns
- Status Codes
The documentation for this class was generated from the following files:
- src/protocols/HTTP/HTTP.h
- src/protocols/HTTP/HTTP.cpp