Download the PHP package babytree-com/httpclient without Composer
On this page you can find all versions of the php package babytree-com/httpclient. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download babytree-com/httpclient
More information about babytree-com/httpclient
Files in babytree-com/httpclient
Download babytree-com/httpclient
More information about babytree-com/httpclient
Files in babytree-com/httpclient
Vendor babytree-com
Package httpclient
Short Description REAL async http/https client for php
License
Package httpclient
Short Description REAL async http/https client for php
License
Please rate this library. Is it a good library?
Informations about the package httpclient
PHP异步http/https客户端
绝大部分互联网公司的php-fpm都跑在单进程单线程模式下,随着微服务架构的兴起,普通的curl已经不能满足复杂业务场景的需求。而curl_multi和guzzle尽管支持多个http请求的异步执行,但是它们的api对后端开发同学并不友好。
babytree-com/httpclient是宝宝树在复杂业务场景下积累的php http客户端。
特性
- http请求和业务代码可以异步执行
- 多个http请求可以异步执行
- 满足psr规范
- 比guzzle、curl_multi更友好的api
- 全中文文档
- 线上复杂业务场景下的考验
其中,http请求和业务代码的异步执行,是curl_multi和guzzle所不支持的。使用httpclient,在复杂业务场景下,可以将总体代码运行时间进一步缩短,进而提高QPS。
依赖
- php 7.0+
- 如果要进行单元测试,需要安装phpunit和go
安装
使用方法
基础用法
业务逻辑和http请求异步
多个请求异步
运行单元测试
选项
TODO: 列出选项,如果有必要,可以写个例子
范例
上传文件
TODO: 上传文件的例子
All versions of httpclient with dependencies
PHP Build Version
Package Version
The package babytree-com/httpclient contains the following files
Loading the files please wait ....