mirror of
https://github.com/friendica/friendica
synced 2025-04-27 23:50:10 +00:00
Use "HttpClientOptions"
This commit is contained in:
parent
1fae0123ec
commit
908d2594ed
5 changed files with 9 additions and 7 deletions
|
@ -26,6 +26,7 @@ use Friendica\Core\Logger;
|
|||
use Friendica\Core\Storage\Exception\ReferenceStorageException;
|
||||
use Friendica\Core\Storage\Capability\ICanReadFromStorage;
|
||||
use Friendica\Network\HTTPClient\Client\HttpClient;
|
||||
use Friendica\Network\HTTPClient\Client\HttpClientOptions;
|
||||
use Friendica\Util\HTTPSignature;
|
||||
|
||||
/**
|
||||
|
@ -54,7 +55,7 @@ class ExternalResource implements ICanReadFromStorage
|
|||
}
|
||||
|
||||
try {
|
||||
$fetchResult = HTTPSignature::fetchRaw($data->url, $data->uid, ['accept_content' => [HttpClient::ACCEPT_IMAGE]]);
|
||||
$fetchResult = HTTPSignature::fetchRaw($data->url, $data->uid, [HttpClientOptions::ACCEPT_CONTENT => [HttpClient::ACCEPT_IMAGE]]);
|
||||
} catch (Exception $exception) {
|
||||
throw new ReferenceStorageException(sprintf('External resource failed to get %s', $reference), $exception->getCode(), $exception);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue