Add new public member to set http client timeout by caller

This commit is contained in:
samuelbles07
2024-09-11 16:02:13 +07:00
parent f929623443
commit e16373a64d
2 changed files with 10 additions and 0 deletions

View File

@ -184,6 +184,15 @@ String AgApiClient::getApiRoot() const { return apiRoot; }
void AgApiClient::setApiRoot(const String &apiRoot) { this->apiRoot = apiRoot; }
/**
* @brief Set http request timeout. (Default: 10s)
*
* @param timeoutMs
*/
void AgApiClient::setTimeout(uint16_t timeoutMs) {
this->timeoutMs = timeoutMs;
}
/**
* @brief Set timeout to both connect to server and tcp connection timeout
*