1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-06-28 05:01:28 +03:00

httpclient: fix error meaning (#7401)

* httpclient: fix error meaning

* deprecate HTTPC_ERROR_CONNECTION_REFUSED
This commit is contained in:
david gauchard
2020-06-25 09:00:24 +02:00
committed by GitHub
parent 00fc716ccc
commit 52f4cc8de0
2 changed files with 7 additions and 5 deletions

View File

@ -48,7 +48,7 @@
#define HTTPCLIENT_DEFAULT_TCP_TIMEOUT (5000)
/// HTTP client errors
#define HTTPC_ERROR_CONNECTION_REFUSED (-1)
#define HTTPC_ERROR_CONNECTION_FAILED (-1)
#define HTTPC_ERROR_SEND_HEADER_FAILED (-2)
#define HTTPC_ERROR_SEND_PAYLOAD_FAILED (-3)
#define HTTPC_ERROR_NOT_CONNECTED (-4)
@ -60,6 +60,8 @@
#define HTTPC_ERROR_STREAM_WRITE (-10)
#define HTTPC_ERROR_READ_TIMEOUT (-11)
constexpr int HTTPC_ERROR_CONNECTION_REFUSED __attribute__((deprecated)) = HTTPC_ERROR_CONNECTION_FAILED;
/// size for the stream handling
#define HTTP_TCP_BUFFER_SIZE (1460)