feat(http-client): add http retry count to config (#3887)

This commit is contained in:
Dag 2024-01-10 21:48:12 +01:00 committed by GitHub
parent c7e8ddf486
commit 080e29365a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 23 additions and 15 deletions

View file

@ -38,6 +38,7 @@ function getContents(
$config = [
'useragent' => Configuration::getConfig('http', 'useragent'),
'timeout' => Configuration::getConfig('http', 'timeout'),
'retries' => Configuration::getConfig('http', 'retries'),
'headers' => array_merge($defaultHttpHeaders, $httpHeadersNormalized),
'curl_options' => $curlOptions,
];
@ -71,7 +72,7 @@ function getContents(
// Ignore invalid 'Last-Modified' HTTP header value
}
}
// todo: to be nice nice citizen we should also check for Etag
// todo: We should also check for Etag
}
$response = $httpClient->request($url, $config);