2525
2626#include " ESP8266HTTPClient.h"
2727
28- #ifdef HTTPCLIENT_1_1_COMPATIBLE
28+ #if HTTPCLIENT_1_1_COMPATIBLE
2929#include < ESP8266WiFi.h>
3030#include < WiFiClientSecure.h>
3131#endif
3232
3333#include < StreamString.h>
3434#include < base64.h>
3535
36- #ifdef HTTPCLIENT_1_1_COMPATIBLE
36+ #if HTTPCLIENT_1_1_COMPATIBLE
3737class TransportTraits
3838{
3939public:
@@ -112,7 +112,7 @@ class BearSSLTraits : public TransportTraits
112112HTTPClient::HTTPClient ()
113113{
114114 _client = nullptr ;
115- #ifdef HTTPCLIENT_1_1_COMPATIBLE
115+ #if HTTPCLIENT_1_1_COMPATIBLE
116116 _tcpDeprecated.reset (nullptr );
117117#endif
118118}
@@ -147,7 +147,7 @@ void HTTPClient::clear()
147147 * @return success bool
148148 */
149149bool HTTPClient::begin (WiFiClient &client, String url) {
150- #ifdef HTTPCLIENT_1_1_COMPATIBLE
150+ #if HTTPCLIENT_1_1_COMPATIBLE
151151 if (_tcpDeprecated) {
152152 DEBUG_HTTPCLIENT (" [HTTP-Client][begin] mix up of new and deprecated api\n " );
153153 _canReuse = false ;
@@ -186,7 +186,7 @@ bool HTTPClient::begin(WiFiClient &client, String url) {
186186 */
187187bool HTTPClient::begin (WiFiClient &client, String host, uint16_t port, String uri, bool https)
188188{
189- #ifdef HTTPCLIENT_1_1_COMPATIBLE
189+ #if HTTPCLIENT_1_1_COMPATIBLE
190190 if (_tcpDeprecated) {
191191 DEBUG_HTTPCLIENT (" [HTTP-Client][begin] mix up of new and deprecated api\n " );
192192 _canReuse = false ;
@@ -205,7 +205,7 @@ bool HTTPClient::begin(WiFiClient &client, String host, uint16_t port, String ur
205205}
206206
207207
208- #ifdef HTTPCLIENT_1_1_COMPATIBLE
208+ #if HTTPCLIENT_1_1_COMPATIBLE
209209bool HTTPClient::begin (String url, String httpsFingerprint)
210210{
211211 if (_client && !_tcpDeprecated) {
@@ -317,7 +317,7 @@ bool HTTPClient::beginInternal(String url, const char* expectedProtocol)
317317 return true ;
318318}
319319
320- #ifdef HTTPCLIENT_1_1_COMPATIBLE
320+ #if HTTPCLIENT_1_1_COMPATIBLE
321321bool HTTPClient::begin (String host, uint16_t port, String uri)
322322{
323323 if (_client && !_tcpDeprecated) {
@@ -423,7 +423,7 @@ void HTTPClient::disconnect()
423423 _client->stop ();
424424 _client = nullptr ;
425425 }
426- #ifdef HTTPCLIENT_1_1_COMPATIBLE
426+ #if HTTPCLIENT_1_1_COMPATIBLE
427427 if (_tcpDeprecated) {
428428 _transportTraits.reset (nullptr );
429429 _tcpDeprecated.reset (nullptr );
@@ -1035,7 +1035,7 @@ bool HTTPClient::connect(void)
10351035 return true ;
10361036 }
10371037
1038- #ifdef HTTPCLIENT_1_1_COMPATIBLE
1038+ #if HTTPCLIENT_1_1_COMPATIBLE
10391039 if (!_client && _transportTraits) {
10401040 _tcpDeprecated = _transportTraits->create ();
10411041 _client = _tcpDeprecated.get ();
@@ -1056,7 +1056,7 @@ bool HTTPClient::connect(void)
10561056
10571057 DEBUG_HTTPCLIENT (" [HTTP-Client] connected to %s:%u\n " , _host.c_str (), _port);
10581058
1059- #ifdef HTTPCLIENT_1_1_COMPATIBLE
1059+ #if HTTPCLIENT_1_1_COMPATIBLE
10601060 if (_tcpDeprecated && !_transportTraits->verify (*_tcpDeprecated, _host.c_str ())) {
10611061 DEBUG_HTTPCLIENT (" [HTTP-Client] transport level verify failed\n " );
10621062 _client->stop ();
0 commit comments