Download the PHP package yurunsoft/yurun-http without Composer

On this page you can find all versions of the php package yurunsoft/yurun-http. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package yurun-http

YurunHttp

Latest Version GitHub Workflow Status (branch) Php Version IMI Doc IMI License

简介

YurunHttp,支持智能识别 Curl/Swoole 场景的高性能 Http Client。

支持链式操作,简单易用。支持并发批量请求、HTTP2、WebSocket 全双工通信协议。

非常适合用于开发通用 SDK 包,不必再为 Swoole 协程兼容而头疼!

YurunHttp 的目标是做最好用的 PHP HTTP Client 开发包!

特性


开发手册文档:https://doc.yurunsoft.com/YurunHttp

API 文档:https://apidoc.gitee.com/yurunsoft/YurunHttp

欢迎各位加入技术支持群17916227点击加群,如有问题可以及时解答和修复。

更加欢迎各位来提交PR(码云/Github),一起完善YurunHttp,让它能够更加好用。

重大版本更新日志

每个小版本的更新日志请移步到 Release 查看

v5.0.1 支持 WebSocket 压缩及指定 Opcode

v5.0.0 支持 psr/http-message ~2.0 版本 (PHP >= 7.1)

v4.3.0 新增支持连接池

v4.2.0 重构 Swoole 处理器,并发请求性能大幅提升 (PHP 版本依赖降为 >= 5.5)

v4.1.0 实现智能识别场景,自动选择适合 Curl/Swoole 环境的处理器

v4.0.0 新增支持 Swoole 并发批量请求 (PHP >= 7.1)

v3.5.0 新增支持 Curl 并发批量请求 (PHP >= 5.5)

v3.4.0 新增支持 Http2 全双工用法

v3.3.0 新增支持 Http2 兼容用法

v3.2.0 新增支持 Swoole WebSocket 客户端

v3.1.0 引入浏览器级别 Cookies 管理

v3.0.0 新增支持 Swoole 协程

v2.0.0 黑历史,不告诉你

v1.3.1 支持 Composer

v1.0-1.3 初期版本迭代

Composer

本项目可以使用composer安装,遵循psr-4自动加载规则,在你的 composer.json 中加入下面的内容

然后执行 composer update 安装。

之后你便可以使用 include "vendor/autoload.php"; 来自动加载类。(ps:不要忘了namespace)

用法

更加详细的用法请看 examples 目录中的示例代码

简单调用

并发批量请求

只有 Swoole 并发请求会受到连接池限制,Curl 不受影响

Swoole 协程模式

连接池

在 YurunHttp 中,连接池是全局的,默认不启用。

每个不同的 hostportssl 都在不同的连接池中,举个例子,下面两个 url 对应的连接池不是同一个:

http://www.imiphp.comhost=www.imiphp.com, port=80, ssl=false

https://www.imiphp.comhost=www.imiphp.com, port=443, ssl=true

启用全局连接池:

禁用全局连接池:

写入连接池设置:

YurunHttp 不会限制未设置的域名的连接数

特殊请求不启用连接池:

获取连接池对象及数据:

WebSocket Client

Http2 兼容用法

Curl、Swoole Handler 都支持 Http2,但需要注意的是编译时都需要带上启用 Http2 的参数。

查看是否支持:

Curl: php --ri curl

Swoole: php --ri swoole

Http2 全双工用法

该用法仅支持 Swoole

具体用法请看 examples/http2Client.php

PSR-7 请求构建


更多用法详见文档:https://doc.yurunsoft.com/YurunHttp

商业合作

现在使用 Swoole 的项目越来越多,使用 YurunHttp 开发的代码,可以原生兼容 php-fpm 和 Swoole 两种环境。

YurunHttp 相比 Guzzle 性能更强,功能更加强大!

现承接使用 PHP 开发相关系统、SDK 等业务,有需要的请联系 QQ: 369124067

捐赠

开源不求盈利,多少都是心意,生活不易,随缘随缘……


All versions of yurun-http with dependencies

PHP Build Version
Package Version
Requires php Version >=7.1
psr/http-message Version ~1.0|~2.0
psr/log Version ~1.0|~2.0|~3.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package yurunsoft/yurun-http contains the following files

Loading the files please wait ....