mirror of
https://github.com/esp8266/Arduino.git
synced 2025-06-16 11:21:18 +03:00
update HTTPCLIENT_1_1_COMPATIBLE (#5389)
* update HTTPCLIENT_1_1_COMPATIBLE: #if instead if #ifdef, set to 1 by default host emulation updates * host CI: minor simplification * revert -j
This commit is contained in:
committed by
Earle F. Philhower, III
parent
4f86a68b56
commit
116da1881c
@ -26,7 +26,9 @@
|
||||
#ifndef ESP8266HTTPClient_H_
|
||||
#define ESP8266HTTPClient_H_
|
||||
|
||||
#define HTTPCLIENT_1_1_COMPATIBLE
|
||||
#ifndef HTTPCLIENT_1_1_COMPATIBLE
|
||||
#define HTTPCLIENT_1_1_COMPATIBLE 1
|
||||
#endif
|
||||
|
||||
#include <memory>
|
||||
#include <Arduino.h>
|
||||
@ -128,7 +130,7 @@ typedef enum {
|
||||
HTTPC_TE_CHUNKED
|
||||
} transferEncoding_t;
|
||||
|
||||
#ifdef HTTPCLIENT_1_1_COMPATIBLE
|
||||
#if HTTPCLIENT_1_1_COMPATIBLE
|
||||
class TransportTraits;
|
||||
typedef std::unique_ptr<TransportTraits> TransportTraitsPtr;
|
||||
#endif
|
||||
@ -148,7 +150,7 @@ public:
|
||||
bool begin(WiFiClient &client, String url);
|
||||
bool begin(WiFiClient &client, String host, uint16_t port, String uri = "/", bool https = false);
|
||||
|
||||
#ifdef HTTPCLIENT_1_1_COMPATIBLE
|
||||
#if HTTPCLIENT_1_1_COMPATIBLE
|
||||
// Plain HTTP connection, unencrypted
|
||||
bool begin(String url) __attribute__ ((deprecated));
|
||||
bool begin(String host, uint16_t port, String uri = "/") __attribute__ ((deprecated));
|
||||
@ -222,7 +224,7 @@ protected:
|
||||
int writeToStreamDataBlock(Stream * stream, int len);
|
||||
|
||||
|
||||
#ifdef HTTPCLIENT_1_1_COMPATIBLE
|
||||
#if HTTPCLIENT_1_1_COMPATIBLE
|
||||
TransportTraitsPtr _transportTraits;
|
||||
std::unique_ptr<WiFiClient> _tcpDeprecated;
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user