Download the PHP package pfinalclub/asyncio-http without Composer

On this page you can find all versions of the php package pfinalclub/asyncio-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 asyncio-http

asyncio-http

🚀 PHP 异步 HTTP 客户端库 v1.0.0
一个不抢戏、却不可替代的基础件,专为异步系统设计的轻量级 HTTP 客户端

PHP Version Version

✨ 特性

🚀 快速开始

安装

基本使用

🏗️ 架构设计

本项目严格遵循极简设计原则,实现了一个功能完整的异步 HTTP 客户端库。

核心模块

模块 职责 核心类
Client/ 用户入口层 Http, RequestBuilder
Core/ 请求生命周期管理 HttpTask, HttpState, HttpScheduler
Transport/ Workerman I/O 实现 WorkermanHttpClient
Pool/ 连接复用 ConnectionPool
Protocol/ HTTP 报文边界处理 HttpMessageReader, RequestEncoder
Support/ 工具类 UrlParser, HeaderBag, Awaitable

🔧 高级用法

支持的 HTTP 方法

请求配置

📚 API 文档

Http 类方法

方法 描述 参数
get(string $url) 创建 GET 请求 $url: 请求URL
post(string $url, mixed $body = null) 创建 POST 请求 $url: 请求URL, $body: 请求体
put(string $url, mixed $body = null) 创建 PUT 请求 $url: 请求URL, $body: 请求体
patch(string $url, mixed $body = null) 创建 PATCH 请求 $url: 请求URL, $body: 请求体
delete(string $url) 创建 DELETE 请求 $url: 请求URL
head(string $url) 创建 HEAD 请求 $url: 请求URL
options(string $url) 创建 OPTIONS 请求 $url: 请求URL

RequestBuilder 类方法

方法 描述 参数
header(string $key, string $value) 设置单个请求头 $key: 头部键, $value: 头部值
headers(array $headers) 批量设置请求头 $headers: 头部数组
body(mixed $body) 设置请求体 $body: 字符串/数组/对象
timeout(float $seconds) 设置超时时间 $seconds: 超时秒数
send() 发送请求 -

HttpResponse 类属性

属性 类型 描述
statusCode int HTTP 状态码
headers array<string, string> 响应头部
body string 响应体

🧪 测试

运行测试套件:

🤝 贡献

欢迎提交 Issue 和 Pull Request!

📄 许可证

本项目基于 MIT 许可证开源。

代码质量

设计原则

  1. HTTP 是 I/O,不是抽象
  2. 策略必须在库外
  3. 状态可见,决策不可见
  4. 任何模块都可以被整体替换

明确的边界

✅ 支持的功能:

❌ 明确禁止:

这正是它该在的位置。


All versions of asyncio-http with dependencies

PHP Build Version
Package Version
Requires pfinalclub/asyncio Version ^3.0
pfinalclub/asyncio-debug Version ^1.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 pfinalclub/asyncio-http contains the following files

Loading the files please wait ...