PHPackages                             reaway/http-curl-client - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [HTTP &amp; Networking](/categories/http)
4. /
5. reaway/http-curl-client

ActiveLibrary[HTTP &amp; Networking](/categories/http)

reaway/http-curl-client
=======================

A simple PHP HTTP Curl client

v1.0.0(5d ago)07↓100%1Apache-2.0PHPPHP &gt;=8.1

Since Mar 17Pushed 5d agoCompare

[ Source](https://github.com/reaway/http-curl-client)[ Packagist](https://packagist.org/packages/reaway/http-curl-client)[ Docs](https://gitee.com/reaway/http-curl-client)[ RSS](/packages/reaway-http-curl-client/feed)WikiDiscussions main Synced today

READMEChangelog (1)Dependencies (1)Versions (2)Used By (1)

HttpCurlClient
==============

[](#httpcurlclient)

一个简单易用的 PHP HTTP Curl 客户端，支持 GET/POST/PUT/DELETE/PATCH 等请求方法，支持 JSON、表单、文件上传等多种数据格式。

特性
--

[](#特性)

- 支持多种 HTTP 请求方法（GET、POST、PUT、DELETE、PATCH 等）
- 支持多种数据格式（JSON、表单、原始 body、文件上传）
- 支持自定义请求头和请求配置
- 支持代理设置
- 支持 HTTP Basic 认证
- 支持 SSL 验证配置
- 自动处理重定向
- 返回详细的响应信息（状态码、响应头、响应体、错误信息等）

安装
--

[](#安装)

```
composer require reaway/http-curl-client
```

环境要求
----

[](#环境要求)

- PHP &gt;= 8.1
- ext-curl
- ext-json

用法
--

[](#用法)

### 基础用法

[](#基础用法)

```
