Rename DI::httpRequest() into DI::httpClient()

This commit is contained in:
Philipp 2021-08-25 21:54:54 +02:00
parent 505100bdd7
commit 13a91e63aa
No known key found for this signature in database
GPG key ID: 9A28B7D4FF5667BD
38 changed files with 94 additions and 94 deletions

View file

@ -59,7 +59,7 @@ class ParseUrl
*/
public static function getContentType(string $url)
{
$curlResult = DI::httpRequest()->head($url);
$curlResult = DI::httpClient()->head($url);
if (!$curlResult->isSuccess()) {
return [];
}
@ -214,7 +214,7 @@ class ParseUrl
return $siteinfo;
}
$curlResult = DI::httpRequest()->get($url, [HTTPClientOptions::CONTENT_LENGTH => 1000000]);
$curlResult = DI::httpClient()->get($url, [HTTPClientOptions::CONTENT_LENGTH => 1000000]);
if (!$curlResult->isSuccess() || empty($curlResult->getBody())) {
return $siteinfo;
}