X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FCore%2FSearch.php;h=ff4abdfacfb4cfcff9e7ba8c9d0696a4ae68539c;hb=2ab0d06996410f68cf501e6e2014bf4829b121ae;hp=a3588b3bd3d53443f5bdac1d57e21f8f7070d3a7;hpb=4d0e6305dd25c25d10a99dcba349bc8cea68831c;p=friendica.git diff --git a/src/Core/Search.php b/src/Core/Search.php index a3588b3bd3..ff4abdfacf 100644 --- a/src/Core/Search.php +++ b/src/Core/Search.php @@ -24,6 +24,7 @@ namespace Friendica\Core; use Friendica\DI; use Friendica\Model\Contact; use Friendica\Network\HTTPException; +use Friendica\Network\HTTPClientOptions; use Friendica\Object\Search\ContactResult; use Friendica\Object\Search\ResultList; use Friendica\Util\Network; @@ -121,7 +122,7 @@ class Search $searchUrl .= '&page=' . $page; } - $resultJson = DI::httpRequest()->fetch($searchUrl, 0, 'application/json'); + $resultJson = DI::httpClient()->fetch($searchUrl, 0, 'application/json'); $results = json_decode($resultJson, true); @@ -227,7 +228,7 @@ class Search $return = Contact::searchByName($search, $mode); } else { $p = $page > 1 ? 'p=' . $page : ''; - $curlResult = DI::httpRequest()->get(self::getGlobalDirectory() . '/search/people?' . $p . '&q=' . urlencode($search), ['accept_content' => 'application/json']); + $curlResult = DI::httpClient()->get(self::getGlobalDirectory() . '/search/people?' . $p . '&q=' . urlencode($search), [HTTPClientOptions::ACCEPT_CONTENT => ['application/json']]); if ($curlResult->isSuccess()) { $searchResult = json_decode($curlResult->getBody(), true); if (!empty($searchResult['profiles'])) {