easyhttp icon indicating copy to clipboard operation
easyhttp copied to clipboard

轻量级、语义化、对IDE友好的HTTP客户端

Results 12 easyhttp issues
Sort by recently updated
recently updated
newest added

只要设置了retry,就直接报错 `PHP Fatal error: Uncaught TypeError: yzh52521\EasyHttp\Retry::yzh52521\EasyHttp\{closure}(): Argument #4 ($exception) must be of type ?yzh52521\EasyHttp\RequestException, GuzzleHttp\Exception\RequestException given, called in /www/webman/miner-galacticash/vendor/guzzlehttp/guzzle/src/RetryMiddleware.php on line 101 and defined in /www/webman/miner-galacticash/vendor/yzh52521/easyhttp/src/Retry.php:26`

```php $response = Http::get('http://127.0.0.1:8000/index/'); ``` 当请求thinkphp启动服务的域名时,内置服务器直接崩溃,网站一直处于请求状态,如果请求非本地域名地址就正常

如何获取cookies 某个值

try 捕获 RequestException会报错,没有继承Exception。

使用webman最新版加载了这个包,使用文档例子进行异步操作。出现错误,提示调用了没有定义的function。 `$promise = Http::getAsync($url, function (Response $response) { echo '异步请求成功,响应内容:' . $response->body() . PHP_EOL; }, function (RequestException $e) { echo '异步请求异常,错误信息:' . $e->getMessage() . PHP_EOL; }); $promise->wait(); echo json_encode(['code' =>...

#31 {main}Error: Call to a member function getHeaders() on null in /app/webman/vendor/yzh52521/easyhttp/src/Request.php:3 Stack trace: #0 [internal function]: yzh52521\EasyHttp\Request->yzh52521\EasyHttp\{closure}() #1 /app/webman/vendor/yzh52521/easyhttp/src/Logger.php(178): call_user_func() #2 /app/webman/vendor/yzh52521/easyhttp/src/Logger.php(141): yzh52521\EasyHttp\Logger->getLogMessage() #3 /app/webman/vendor/yzh52521/easyhttp/src/Logger.php(244): yzh52521\EasyHttp\Logger->log() #4 /app/webman/vendor/guzzlehttp/promises/src/RejectedPromise.php(42): yzh52521\EasyHttp\Logger->yzh52521\EasyHttp\{closu...

系统偶尔报错Call to a member function getHeaders() on null, 重启下webman就好了,但是过了一会又报相同的错。下面是报错信息 `"Error: Call to a member function getHeaders() on null in /app/vendor/yzh52521/easyhttp/src/Request.php:381\nStack trace:\n#0 [internal function]: yzh52521\\EasyHttp\\Request->yzh52521\\EasyHttp\\{closure}(Object(GuzzleHttp\\Psr7\\Request), NULL, Object(GuzzleHttp\\Exception\\ConnectException))\n#1 /app/vendor/yzh52521/easyhttp/src/Logger.php(178): call_user_func(Object(Closure), Object(GuzzleHttp\\Psr7\\Request), NULL,...

https://learnku.com/docs/laravel/9.x/http-client/12231#a0e394 像laravel 一样的宏, 这样很方便封装sdk

http_build_query(): Passing null to parameter #2 ($numeric_prefix) of type string is deprecated