Class HTTPClient
Public Functions
Type | Name |
---|---|
int | GET () request handling |
HTTPClient () |
|
int | PATCH (uint8_t * payload, size_t size) |
int | PATCH (String payload) |
int | POST (uint8_t * payload, size_t size) |
int | POST (String payload) |
int | PUT (uint8_t * payload, size_t size) |
int | PUT (String payload) |
void | addHeader (const String & name, const String & value, bool first=false, bool replace=true) |
bool | begin (WiFiClient & client, String url) |
bool | begin (WiFiClient & client, String host, uint16_t port, String uri="/", bool https=false) |
bool | begin (String url) |
bool | begin (String url, const char * CAcert) |
bool | begin (String host, uint16_t port, String uri="/") |
bool | begin (String host, uint16_t port, String uri, const char * CAcert) |
bool | begin (String host, uint16_t port, String uri, const char * CAcert, const char * cli_cert, const char * cli_key) |
void | clearAllCookies () |
void | collectHeaders (const char * headerKeys, const size_t headerKeysCount) Response handling. |
bool | connected (void) |
void | end (void) |
const String & | getLocation (void) |
int | getSize (void) |
WiFiClient & | getStream (void) |
WiFiClient * | getStreamPtr (void) |
bool | hasHeader (const char * name) |
String | header (const char * name) |
String | header (size_t i) |
String | headerName (size_t i) |
int | headers () |
void | resetCookieJar () |
int | sendRequest (const char * type, String payload) |
int | sendRequest (const char * type, uint8_t * payload=NULL, size_t size=0) |
int | sendRequest (const char * type, Stream * stream, size_t size=0) |
void | setAuthorization (const char * user, const char * password) |
void | setAuthorization (const char * auth) |
void | setAuthorizationType (const char * authType) |
void | setConnectTimeout (int32_t connectTimeout) |
void | setCookieJar (CookieJar * cookieJar) Cookie jar support. |
void | setFollowRedirects (followRedirects_t follow) |
void | setRedirectLimit (uint16_t limit) |
void | setReuse (bool reuse) |
void | setTimeout (uint16_t timeout) |
bool | setURL (const String & url) |
void | setUserAgent (const String & userAgent) keep-alive |
void | useHTTP10 (bool usehttp10=true) |
int | writeToStream (Stream * stream) |
~HTTPClient () |
Public Static Functions
Type | Name |
---|---|
String | errorToString (int error) |
Protected Attributes
Type | Name |
---|---|
String | _authorizationType = = "Basic" |
String | _base64Authorization |
bool | _canReuse = = false |
WiFiClient * | _client = = nullptr |
int32_t | _connectTimeout = = -1 |
CookieJar * | _cookieJar = = nullptr Cookie jar support. |
RequestArgument * | _currentHeaders = = nullptr Response handling. |
followRedirects_t | _followRedirects = = HTTPC_DISABLE_FOLLOW_REDIRECTS |
size_t | _headerKeysCount = = 0 |
String | _headers |
String | _host request handling |
String | _location |
uint16_t | _port = = 0 |
String | _protocol |
uint16_t | _redirectLimit = = 10 |
int | _returnCode = = 0 |
bool | _reuse = = true |
bool | _secure = = false |
int | _size = = -1 |
std::unique_ptr< WiFiClient > | _tcpDeprecated |
uint16_t | _tcpTimeout = = HTTPCLIENT_DEFAULT_TCP_TIMEOUT |
transferEncoding_t | _transferEncoding = = HTTPC_TE_IDENTITY |
TransportTraitsPtr | _transportTraits |
String | _uri |
bool | _useHTTP10 = = false |
String | _userAgent = = "ESP32HTTPClient" |
Protected Functions
Type | Name |
---|---|
bool | beginInternal (String url, const char * expectedProtocol) |
void | clear () |
bool | connect (void) |
void | disconnect (bool preserveClient=false) |
bool | generateCookieString (String * cookieString) |
int | handleHeaderResponse () |
int | returnError (int error) |
bool | sendHeader (const char * type) |
void | setCookie (String date, String headerValue) Cookie jar support. |
int | writeToStreamDataBlock (Stream * stream, int len) |
Public Functions Documentation
function GET
function HTTPClient
function PATCH [1/2]
function PATCH [2/2]
function POST [1/2]
function POST [2/2]
function PUT [1/2]
function PUT [2/2]
function addHeader
void HTTPClient::addHeader (
const String & name,
const String & value,
bool first=false,
bool replace=true
)
function begin [1/7]
function begin [2/7]
bool HTTPClient::begin (
WiFiClient & client,
String host,
uint16_t port,
String uri="/",
bool https=false
)
function begin [3/7]
function begin [4/7]
function begin [5/7]
function begin [6/7]
function begin [7/7]
bool HTTPClient::begin (
String host,
uint16_t port,
String uri,
const char * CAcert,
const char * cli_cert,
const char * cli_key
)
function clearAllCookies
function collectHeaders
function connected
function end
function getLocation
function getSize
function getStream
function getStreamPtr
function hasHeader
function header [1/2]
function header [2/2]
function headerName
function headers
function resetCookieJar
function sendRequest [1/3]
function sendRequest [2/3]
function sendRequest [3/3]
function setAuthorization [1/2]
function setAuthorization [2/2]
function setAuthorizationType
function setConnectTimeout
function setCookieJar
function setFollowRedirects
function setRedirectLimit
function setReuse
function setTimeout
function setURL
function setUserAgent
function useHTTP10
function writeToStream
function ~HTTPClient
Public Static Functions Documentation
function errorToString
Protected Attributes Documentation
variable _authorizationType
variable _base64Authorization
variable _canReuse
variable _client
variable _connectTimeout
variable _cookieJar
variable _currentHeaders
variable _followRedirects
variable _headerKeysCount
variable _headers
variable _host
variable _location
variable _port
variable _protocol
variable _redirectLimit
variable _returnCode
variable _reuse
variable _secure
variable _size
variable _tcpDeprecated
variable _tcpTimeout
variable _transferEncoding
variable _transportTraits
variable _uri
variable _useHTTP10
variable _userAgent
Protected Functions Documentation
function beginInternal
function clear
function connect
function disconnect
function generateCookieString
function handleHeaderResponse
function returnError
function sendHeader
function setCookie
function writeToStreamDataBlock
The documentation for this class was generated from the following file cores/common/arduino/libraries/ext/HTTPClient/HTTPClient.h