From 83cb35da52743a4476a830e01f146160c36d81e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mark=20Schl=C3=B6gel?= <44850130+MarkSchloegel@users.noreply.github.com> Date: Tue, 5 Feb 2019 20:59:35 +0100 Subject: [PATCH] Patch 1 (#2646) Increase http timeout 10s -> 60s --- app/http/httpclient.h | 2 +- docs/modules/http.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/http/httpclient.h b/app/http/httpclient.h index a8a250d7..c69f7c36 100644 --- a/app/http/httpclient.h +++ b/app/http/httpclient.h @@ -44,7 +44,7 @@ static const char log_prefix[] = "HTTP client: "; /* * Timeout of http request. */ -#define HTTP_REQUEST_TIMEOUT_MS (10000) +#define HTTP_REQUEST_TIMEOUT_MS (60000) /* * "full_response" is a string containing all response headers and the response body. diff --git a/docs/modules/http.md b/docs/modules/http.md index cdaf442b..f5dcde19 100644 --- a/docs/modules/http.md +++ b/docs/modules/http.md @@ -9,7 +9,7 @@ Basic HTTP *client* module that provides an interface to do GET/POST/PUT/DELETE It is **not** possible to execute concurrent HTTP requests using this module. -Each request method takes a callback which is invoked when the response has been received from the server. The first argument is the status code, which is either a regular HTTP status code, or -1 to denote a DNS, connection or out-of-memory failure, or a timeout (currently at 10 seconds). +Each request method takes a callback which is invoked when the response has been received from the server. The first argument is the status code, which is either a regular HTTP status code, or -1 to denote a DNS, connection or out-of-memory failure, or a timeout (currently at 60 seconds). For each operation it is possible to provide custom HTTP headers or override standard headers. By default the `Host` header is deduced from the URL and `User-Agent` is `ESP8266`. Note, however, that the `Connection` header *can not* be overridden! It is always set to `close`.