当这样配置options时报错,报错信息如下:
Status code must be an integer value between 1xx and 5xx. {"userId":1,"exception":"[object] (InvalidArgumentException(code: 0): Status code must be an integer value between 1xx and 5xx. at /var/www/html/hk01-bbt-webapi/vendor/guzzlehttp/psr7/src/Response.php:151)"}
代码如下: `DefaultHandler::setDefaultHandler(SwooleHandler::class); $client = new Client(); try{ $response = $client->request('GET', 'https://baidu.com', [ // 'verify' => false, 'expect' => false, 'timeout' => 30 ]); $aa = $response->getBody()->getContents(); }catch (RequestException $e){
当这样配置options时报错,报错信息如下: Status code must be an integer value between 1xx and 5xx. {"userId":1,"exception":"[object] (InvalidArgumentException(code: 0): Status code must be an integer value between 1xx and 5xx. at /var/www/html/hk01-bbt-webapi/vendor/guzzlehttp/psr7/src/Response.php:151)"}