mirror of
https://github.com/friendica/friendica
synced 2025-04-30 13:44:22 +02:00
Use "HttpClientOptions"
This commit is contained in:
parent
1fae0123ec
commit
908d2594ed
5 changed files with 9 additions and 7 deletions
|
@ -267,9 +267,9 @@ class HttpClient implements ICanSendHttpRequests
|
|||
return $this->get(
|
||||
$url,
|
||||
[
|
||||
'timeout' => $timeout,
|
||||
'accept_content' => $accept_content,
|
||||
'cookiejar' => $cookiejar
|
||||
HttpClientOptions::TIMEOUT => $timeout,
|
||||
HttpClientOptions::ACCEPT_CONTENT => $accept_content,
|
||||
HttpClientOptions::COOKIEJAR => $cookiejar
|
||||
]
|
||||
);
|
||||
}
|
||||
|
|
|
@ -932,7 +932,7 @@ class Probe
|
|||
{
|
||||
$xrd_timeout = DI::config()->get('system', 'xrd_timeout', 20);
|
||||
|
||||
$curlResult = DI::httpClient()->get($url, [HttpClientOptions::TIMEOUT => $xrd_timeout, HttpClientOptions::ACCEPT_CONTENT => [$type]]);
|
||||
$curlResult = DI::httpClient()->get($url, [HttpClientOptions::TIMEOUT => $xrd_timeout, HttpClientOptions::ACCEPT_CONTENT => $type]);
|
||||
if ($curlResult->isTimeout()) {
|
||||
self::$istimeout = true;
|
||||
return [];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue