📜  cURL 错误 6:无法解析主机:api.themoviedb.org(请参阅 https:curl.haxx.se libcurl c libcurl-errors.html)对于 https:api.themoviedb.org 3 电影流行?api_key=5cb73b68870b70a436b10ea06298de07 - PHP 代码示例

📅  最后修改于: 2022-03-11 14:54:43.089000             🧑  作者: Mango

代码示例1
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();