1
0
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:
david gauchard
2018-11-29 19:42:44 +01:00
committed by Earle F. Philhower, III
parent 4f86a68b56
commit 116da1881c
5 changed files with 41 additions and 20 deletions

View File

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