1
0
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:
Markus Sattler
2015-12-09 13:51:55 +01:00
parent 62f38bfef3
commit a9ce1b4f2e
3 changed files with 28 additions and 3 deletions

View File

@ -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;