Move ACCEPT constants to own "enum" class

This commit is contained in:
Philipp 2022-04-02 20:26:11 +02:00
parent c700645385
commit 73c3b21665
No known key found for this signature in database
GPG key ID: 24A7501396EB5432
35 changed files with 144 additions and 138 deletions

View file

@ -32,7 +32,7 @@ use Friendica\DI;
use Friendica\Core\Config\Factory\Config;
use Friendica\Model\Register;
use Friendica\Module\BaseAdmin;
use Friendica\Network\HTTPClient\Client\HttpClient;
use Friendica\Network\HTTPClient\Client\HttpClientAccept;
use Friendica\Network\HTTPClient\Client\HttpClientOptions;
use Friendica\Network\HTTPException\ServiceUnavailableException;
use Friendica\Util\DateTimeFormat;
@ -250,7 +250,7 @@ class Summary extends BaseAdmin
private static function checkSelfHostMeta()
{
// Fetch the host-meta to check if this really is a vital server
return DI::httpClient()->get(DI::baseUrl()->get() . '/.well-known/host-meta', [HttpClientOptions::ACCEPT_CONTENT => HttpClient::ACCEPT_XRD_XML])->isSuccess();
return DI::httpClient()->get(DI::baseUrl()->get() . '/.well-known/host-meta', [HttpClientOptions::ACCEPT_CONTENT => HttpClientAccept::XRD_XML])->isSuccess();
}
}