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`.