mirror of
https://github.com/friendica/friendica
synced 2025-05-11 05:44:10 +02:00
The redundant function "fetchfull" is removed
This commit is contained in:
parent
9bf5b27362
commit
22828388c0
6 changed files with 25 additions and 43 deletions
|
@ -18,6 +18,7 @@ use Friendica\Database\Database;
|
|||
use Friendica\Database\DBA;
|
||||
use Friendica\DI;
|
||||
use Friendica\Network\HTTPClient\Client\HttpClientAccept;
|
||||
use Friendica\Network\HTTPClient\Client\HttpClientOptions;
|
||||
use Friendica\Network\HTTPClient\Client\HttpClientRequest;
|
||||
use Friendica\Util\DateTimeFormat;
|
||||
use Friendica\Util\Network;
|
||||
|
@ -87,7 +88,7 @@ class OEmbed
|
|||
// but their OEmbed endpoint is only accessible by HTTPS ¯\_(ツ)_/¯
|
||||
$href = str_replace(['http://www.youtube.com/', 'http://player.vimeo.com/'],
|
||||
['https://www.youtube.com/', 'https://player.vimeo.com/'], $href);
|
||||
$result = DI::httpClient()->fetchFull($href . '&maxwidth=' . $a->getThemeInfoValue('videowidth'), HttpClientAccept::DEFAULT, 0, '', HttpClientRequest::SITEINFO);
|
||||
$result = DI::httpClient()->get($href . '&maxwidth=' . $a->getThemeInfoValue('videowidth'), HttpClientAccept::DEFAULT, [HttpClientOptions::REQUEST => HttpClientRequest::SITEINFO]);
|
||||
if ($result->isSuccess()) {
|
||||
$json_string = $result->getBodyString();
|
||||
break;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue