mirror of
https://github.com/esp8266/Arduino.git
synced 2025-06-13 13:01:55 +03:00
add Authorization support for HTTP client
This commit is contained in:
@ -25,7 +25,7 @@
|
||||
#ifndef ESP8266HTTPClient_H_
|
||||
#define ESP8266HTTPClient_H_
|
||||
|
||||
//#define DEBUG_HTTPCLIENT(...) Serial1.printf( __VA_ARGS__ )
|
||||
#define DEBUG_HTTPCLIENT(...) Serial1.printf( __VA_ARGS__ )
|
||||
|
||||
#ifndef DEBUG_HTTPCLIENT
|
||||
#define DEBUG_HTTPCLIENT(...)
|
||||
@ -121,6 +121,7 @@ class HTTPClient {
|
||||
|
||||
void setReuse(bool reuse); /// keep-alive
|
||||
void setUserAgent(const char * userAgent);
|
||||
void setAuthorization(const char * user, const char * password);
|
||||
|
||||
/// request handling
|
||||
int GET();
|
||||
@ -172,6 +173,7 @@ class HTTPClient {
|
||||
|
||||
String _Headers;
|
||||
String _userAgent;
|
||||
String _base64Authorization;
|
||||
|
||||
/// Response handling
|
||||
RequestArgument* _currentHeaders;
|
||||
|
Reference in New Issue
Block a user