"accept" constants introduced and used

This commit is contained in:
Michael
2022-03-28 10:33:06 +00:00
parent 4f2d659d42
commit ff70f74952
7 changed files with 86 additions and 45 deletions

View File

@@ -28,6 +28,7 @@ use Friendica\DI;
use Friendica\Model\APContact;
use Friendica\Model\Contact;
use Friendica\Model\User;
use Friendica\Network\HTTPClient\Client\HttpClient;
use Friendica\Network\HTTPClient\Client\HttpClientOptions;
/**
@@ -415,7 +416,7 @@ class HTTPSignature
* @return \Friendica\Network\HTTPClient\Capability\ICanHandleHttpResponses CurlResult
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
*/
public static function fetchRaw($request, $uid = 0, $opts = ['accept_content' => ['application/activity+json, application/ld+json; profile="https://www.w3.org/ns/activitystreams"']])
public static function fetchRaw($request, $uid = 0, $opts = ['accept_content' => [HttpClient::ACCEPT_JSON_AS]])
{
$header = [];