]> git.mxchange.org Git - friendica.git/blobdiff - src/Worker/PullDirectory.php
doc/themes.md,FAQ-admin: point to live friendica-themes.com mirror
[friendica.git] / src / Worker / PullDirectory.php
index d9a559bf5f260255f5a68958a9640baba242ea85..0ea03a17f3112fec3a853d3850e2ef846ea4822b 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /**
- * @copyright Copyright (C) 2010-2021, the Friendica project
+ * @copyright Copyright (C) 2010-2022, the Friendica project
  *
  * @license GNU AGPL version 3 or any later version
  *
@@ -24,6 +24,7 @@ namespace Friendica\Worker;
 use Friendica\Core\Logger;
 use Friendica\DI;
 use Friendica\Model\Contact;
+use Friendica\Network\HTTPClient\Client\HttpClient;
 
 class PullDirectory
 {
@@ -47,7 +48,7 @@ class PullDirectory
 
                Logger::info('Synchronization started.', ['now' => $now, 'directory' => $directory]);
 
-               $result = DI::httpRequest()->fetch($directory . '/sync/pull/since/' . $now);
+               $result = DI::httpClient()->fetch($directory . '/sync/pull/since/' . $now, 0, HttpClient::ACCEPT_JSON);
                if (empty($result)) {
                        Logger::info('Directory server return empty result.', ['directory' => $directory]);
                        return;