X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FCore%2FSearch.php;h=6c741821e5a138ea2e063f225e584372bc06c5a3;hb=4724000d06cd47bd5eee97111f2723962007d3dc;hp=a3588b3bd3d53443f5bdac1d57e21f8f7070d3a7;hpb=852d148efdfb737ea192b296cf07055194ac7706;p=friendica.git diff --git a/src/Core/Search.php b/src/Core/Search.php index a3588b3bd3..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'])) {