easyhttp
easyhttp copied to clipboard
EasyHttp 是一个轻量级、语义化、对IDE友好的HTTP客户端,支持常见的HTTP请求、异步请求和并发请求,让你可以快速地使用 HTTP 请求与其他 Web 应用进行通信。
``` $data = []; $promises=[]; Http::concurrency(10)->multiAsync($promises, function (Response $response, $index) use(&$data) { $data[]= $response->body(); }, function (RequestException $e, $index) { echo "发起第 $index 个请求失败,失败原因:" . $e->getMessage() . PHP_EOL; }); print_r($data);...
系统:ubuntu server 22.04 PHP版本:8.2 "During inheritance of ArrayAccess: Uncaught think\exception\ErrorException: Return type of Gouguoyin\EasyHttp\Response::offsetExists($offset) should either be compatible with ArrayAccess::offsetExists(mixed $offset): bool, or the #[\ReturnTypeWillChange] attribute should be used to...