]> git.mxchange.org Git - friendica.git/blobdiff - src/Worker/UpdateServerPeers.php
Use a constant for the avatar base path
[friendica.git] / src / Worker / UpdateServerPeers.php
index d2a127b82fdfeb77e10e94bbe01589a06b3af0b2..98ae88a97b5be8acded06a0dc1a0f040ecfc4a10 100644 (file)
@@ -25,8 +25,7 @@ use Friendica\Core\Logger;
 use Friendica\Database\DBA;
 use Friendica\DI;
 use Friendica\Model\GServer;
-use Friendica\Network\HTTPClient\Client\HttpClient;
-use Friendica\Network\HTTPClient\Client\HttpClientOptions;
+use Friendica\Network\HTTPClient\Client\HttpClientAccept;
 use Friendica\Util\Strings;
 
 class UpdateServerPeers
@@ -37,7 +36,7 @@ class UpdateServerPeers
         */
        public static function execute(string $url)
        {
-               $ret = DI::httpClient()->get($url . '/api/v1/instance/peers', [HttpClientOptions::ACCEPT_CONTENT => HttpClient::ACCEPT_JSON]);
+               $ret = DI::httpClient()->get($url . '/api/v1/instance/peers', HttpClientAccept::JSON);
                if (!$ret->isSuccess() || empty($ret->getBody())) {
                        Logger::info('Server is not reachable or does not offer the "peers" endpoint', ['url' => $url]);
                        return;