mirror of
https://github.com/friendica/friendica
synced 2025-04-23 22:30:10 +00:00
Restructure HTTPClient for new paradigm
This commit is contained in:
parent
fa55928ea3
commit
409d909d0f
25 changed files with 210 additions and 198 deletions
|
@ -26,7 +26,7 @@ use Friendica\Core\System;
|
|||
use Friendica\Database\Database;
|
||||
use Friendica\Database\DBA;
|
||||
use Friendica\DI;
|
||||
use Friendica\Network\HTTPClientOptions;
|
||||
use Friendica\Network\HTTPClient\Client\HttpClientOptions;
|
||||
use Friendica\Util\Proxy;
|
||||
|
||||
/**
|
||||
|
@ -100,7 +100,7 @@ class Link
|
|||
{
|
||||
$timeout = DI::config()->get('system', 'xrd_timeout');
|
||||
|
||||
$curlResult = DI::httpClient()->head($url, [HTTPClientOptions::TIMEOUT => $timeout]);
|
||||
$curlResult = DI::httpClient()->head($url, [HttpClientOptions::TIMEOUT => $timeout]);
|
||||
if ($curlResult->isSuccess()) {
|
||||
if (empty($media['mimetype'])) {
|
||||
return $curlResult->getHeader('Content-Type')[0] ?? '';
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue