Skip to content

Commit 178d8b8

Browse files
Adds part about http error codes to readme.
1 parent 34878c2 commit 178d8b8

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

README.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,5 +53,24 @@ influx.prepare(measurement3)
5353
boolean success = influx.write();
5454
```
5555

56+
## Http client error codes
57+
Internally `ESP8266HTTPClient` is used.
58+
```C
59+
/// HTTP client errors
60+
#define HTTPC_ERROR_CONNECTION_REFUSED (-1)
61+
#define HTTPC_ERROR_SEND_HEADER_FAILED (-2)
62+
#define HTTPC_ERROR_SEND_PAYLOAD_FAILED (-3)
63+
#define HTTPC_ERROR_NOT_CONNECTED (-4)
64+
#define HTTPC_ERROR_CONNECTION_LOST (-5)
65+
#define HTTPC_ERROR_NO_STREAM (-6)
66+
#define HTTPC_ERROR_NO_HTTP_SERVER (-7)
67+
#define HTTPC_ERROR_TOO_LESS_RAM (-8)
68+
#define HTTPC_ERROR_ENCODING (-9)
69+
#define HTTPC_ERROR_STREAM_WRITE (-10)
70+
#define HTTPC_ERROR_READ_TIMEOUT (-11)
71+
...
72+
```
73+
See [list of error codes](https://github.com/esp8266/Arduino/blob/cc0bfa04d401810ed3f5d7d01be6e88b9011997f/libraries/ESP8266HTTPClient/src/ESP8266HTTPClient.h#L44-L55) and [list of http status codes](https://github.com/esp8266/Arduino/blob/cc0bfa04d401810ed3f5d7d01be6e88b9011997f/libraries/ESP8266HTTPClient/src/ESP8266HTTPClient.h#L60-L120).
74+
5675
## Documentation
5776
For the documentation see [html/class_influxdb.html](html/class_influxdb.html) (only works locally).

0 commit comments

Comments
 (0)