PHPackages                             axguowen/http-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. axguowen/http-client

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

axguowen/http-client
====================

Simple HTTP Client Library for PHP

v1.0.1(2y ago)01655Apache-2.0PHPPHP &gt;=5.6.0

Since Jun 3Pushed 6mo ago1 watchersCompare

[ Source](https://github.com/axguowen/http-client)[ Packagist](https://packagist.org/packages/axguowen/http-client)[ RSS](/packages/axguowen-http-client/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (2)DependenciesVersions (3)Used By (5)

PHP HTTP客户端
===========

[](#php-http客户端)

一个简单的HTTP客户端工具

主要功能：

发送请求

安装
--

[](#安装)

```
composer require axguowen/http-client
```

用法示例
----

[](#用法示例)

发送get请求

```
// 请求url
$url = 'https://domain/path/';
// header参数
$headers = [
    'Content-Type' => 'application/json;charset=utf-8'
];
// 发送请求
$ret = \axguowen\HttpClient::post($url, $headers);
if (!$ret->ok()) {
    return [null, new \axguowen\httpclient\Error($path, $ret)];
}
$r = ($ret->body === null) ? [] : $ret->json();
```

发送post请求

```
// 请求url
$url = 'https://domain/path/';
// 请求体
$body = [
    'id' => 1,
    'page' => 2,
];
// header参数
$headers = [
    'Content-Type' => 'application/json;charset=utf-8'
];
// 发送请求
$ret = \axguowen\HttpClient::post($url, $body, $headers);
if (!$ret->ok()) {
    return [null, new \axguowen\httpclient\Error($path, $ret)];
}
$r = ($ret->body === null) ? [] : $ret->json();
```

###  Health Score

29

—

LowBetter than 59% of packages

Maintenance46

Moderate activity, may be stable

Popularity12

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity40

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~259 days

Total

2

Last Release

821d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/5bb2b3388238042a25cf42dc44e5ff84adc241510354abae9e91573556753205?d=identicon)[axguowen](/maintainers/axguowen)

---

Top Contributors

[![axguowen](https://avatars.githubusercontent.com/u/61955804?v=4)](https://github.com/axguowen "axguowen (9 commits)")

### Embed Badge

![Health badge](/badges/axguowen-http-client/health.svg)

```
[![Health](https://phpackages.com/badges/axguowen-http-client/health.svg)](https://phpackages.com/packages/axguowen-http-client)
```

###  Alternatives

[friendsofsymfony/rest-bundle

This Bundle provides various tools to rapidly develop RESTful API's with Symfony

2.8k73.3M319](/packages/friendsofsymfony-rest-bundle)[php-http/discovery

Finds and installs PSR-7, PSR-17, PSR-18 and HTTPlug implementations

1.3k309.5M1.2k](/packages/php-http-discovery)[pusher/pusher-php-server

Library for interacting with the Pusher REST API

1.5k94.8M293](/packages/pusher-pusher-php-server)[react/http

Event-driven, streaming HTTP client and server implementation for ReactPHP

78026.4M414](/packages/react-http)[php-http/curl-client

PSR-18 and HTTPlug Async client with cURL

48347.0M384](/packages/php-http-curl-client)[smi2/phpclickhouse

PHP ClickHouse Client

84310.1M71](/packages/smi2-phpclickhouse)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
