Oara\Network\Publisher\HasOffers::call PHP Метод

call() приватный Метод

private call ( $apiUrl ) : mixed
$apiUrl
Результат mixed
    private function call($apiUrl)
    {
        // Initiate the REST call via curl
        $ch = \curl_init($apiUrl);
        // Set the HTTP method to GET
        \curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET');
        // Don't return headers
        \curl_setopt($ch, CURLOPT_HEADER, false);
        // Return data after call is made
        \curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
        // Execute the REST call
        $response = \curl_exec($ch);
        $array = \json_decode($response, true);
        // Close the connection
        \curl_close($ch);
        return $array;
    }