cURL error 6: Could not resolve host: booking (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) code example

Example: cURL error 6: Could not resolve host: api.themoviedb.org (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) for https://api.themoviedb.org/3/movie/popular?api_key=5cb73b68870b70a436b10ea06298de07

if ($this->async) {            return $this->makePromise($method, $url, $options);        }         return retry($this->tries ?? 1, function () use ($method, $url, $options) {            try {                return tap(new Response($this->sendRequest($method, $url, $options)), function ($response) {                    $this->populateResponse($response);                     if ($this->tries > 1 && ! $response->successful()) {                        $response->throw();                    }                });            } catch (ConnectException $e) {                throw new ConnectionException($e->getMessage(), 0, $e);            }        }, $this->retryDelay ?? 100);    }     /**     * Parse multi-part form data.     *     * @param  array  $data     * @return array|array[]     */    protected function parseMultipartBodyFormat(array $data)    {        return collect($data)->map(function ($value, $key) {            return is_array($value) ? $value : ['name' => $key, 'contents' => $value];        })->values()->all();

Tags:

Php Example