承接 efabrica/revolt-curl-client 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

efabrica/revolt-curl-client

最新稳定版本:0.1.4

Composer 安装命令:

composer require efabrica/revolt-curl-client

包简介

Implementation of Symfony's HttpClientInterface that combines multicurl with Revolt's async EventLoop

README 文档

README

This is a fork of symfony/http-client's CurlClient that uses Revolt's async EventLoop to wait for the response instead of blocking the main thread.

This client was created because native PHP streams that are used by amphp/http-client are slow, as our applications were hanging on stream_select() a lot but they weren't hanging on curl_multi_select(). Reasons for this are unknown to us, but if you know, please share your knowledge and we will place it in this README.

It uses Symfony's @internal classes, so it might break on minor Symfony versions. We will rush to fix it if it does.

Installation

composer require efabrica/revolt-curl-client

Usage

use Efabrica\RevoltCurlClient\RevoltCurlClient; $client = new RevoltCurlClient(); $f1 = async(function () use ($client) { echo "Request 1\n"; $response = $client->request('GET', 'https://httpbin.org/get?1'); $response->getContent(); echo "Request 2\n"; $response2 = $client->request('GET', 'https://httpbin.org/get?2'); $response2->getContent(); }); $f2 = async(function () use ($client) { echo "Request 3\n"; $response = $client->request('GET', 'https://httpbin.org/get?3'); $response->getContent(); echo "Request 4\n"; $response2 = $client->request('GET', 'https://httpbin.org/get?4'); $response2->getContent(); }); await([$f1, $f2]); // Outputs: // Request 1 // Request 3 // Request 2 // Request 4

统计信息

  • 总下载量: 14.66k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 4
  • 依赖项目数: 1
  • 推荐数: 1

GitHub 信息

  • Stars: 1
  • Watchers: 3
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-01-04

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固