Use HTTPRequestOptions constants for HTTPClient::get()

This commit is contained in:
Philipp 2021-08-25 21:18:06 +02:00
parent aad7bac686
commit 0cafa871f1
No known key found for this signature in database
GPG key ID: 9A28B7D4FF5667BD
7 changed files with 22 additions and 16 deletions

View file

@ -38,6 +38,7 @@ use Friendica\Model\ItemURI;
use Friendica\Model\Post;
use Friendica\Model\Tag;
use Friendica\Model\User;
use Friendica\Network\HTTPRequestOptions;
use Friendica\Network\Probe;
use Friendica\Util\DateTimeFormat;
use Friendica\Util\Images;
@ -727,7 +728,7 @@ class OStatus
self::$conv_list[$conversation] = true;
$curlResult = DI::httpRequest()->get($conversation, ['accept_content' => ['application/atom+xml', 'text/html']]);
$curlResult = DI::httpRequest()->get($conversation, [HTTPRequestOptions::ACCEPT_CONTENT => ['application/atom+xml', 'text/html']]);
if (!$curlResult->isSuccess() || empty($curlResult->getBody())) {
return;
@ -921,7 +922,7 @@ class OStatus
}
$stored = false;
$curlResult = DI::httpRequest()->get($related, ['accept_content' => ['application/atom+xml', 'text/html']]);
$curlResult = DI::httpRequest()->get($related, [HTTPRequestOptions::ACCEPT_CONTENT => ['application/atom+xml', 'text/html']]);
if (!$curlResult->isSuccess() || empty($curlResult->getBody())) {
return;