X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FCore%2FSearch.php;h=6c741821e5a138ea2e063f225e584372bc06c5a3;hb=7b68a5956e831fdb32d99b6840654dc050cf3c63;hp=efe8331b856f3a583aa7ebce4f366ac13a22f02e;hpb=2356221abaa5d9ea2eb86174e91b0d43913f413c;p=friendica.git diff --git a/src/Core/Search.php b/src/Core/Search.php index efe8331b85..6c741821e5 100644 --- a/src/Core/Search.php +++ b/src/Core/Search.php @@ -1,6 +1,6 @@ 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'])) {