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

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

fishtail/http
=============

Http GET and POST methods.

v1.0.1(5y ago)2375MITPHP

Since Jul 26Pushed 5y ago1 watchersCompare

[ Source](https://github.com/fishtailstudio/http)[ Packagist](https://packagist.org/packages/fishtail/http)[ RSS](/packages/fishtail-http/feed)WikiDiscussions dev Synced 1w ago

READMEChangelogDependenciesVersions (6)Used By (0)

##### 经常在项目里面会用上GET和POST请求方法，使用封装好的方法会方便很多。

[](#经常在项目里面会用上get和post请求方法使用封装好的方法会方便很多)

一、安装
----

[](#一安装)

```
composer require fishtail/http
```

二、使用
----

[](#二使用)

### 1. 导入

[](#1-导入)

```
use Fishtail\Http;
```

### 2. GET请求

[](#2-get请求)

```
$res = Http::get('https://www.baidu.com');
```

### 3. POST请求

[](#3-post请求)

```
$url = 'http://example.com';
$header = [
	'Accept: */*',
	'Content-Type: text/plain;charset=UTF-8'
];
$cookie = 'token=2f2568ae-75f0-4ba9-98d4-8c139dad7f64';
$postData = [
	'page' => 1,
	'pageSize' => 20
];
$res = Http::post($url, $postData, $cookie, $header);
```

三、参数解释
------

[](#三参数解释)

### 1. GET方法

[](#1-get方法)

参数类型描述urlstring请求的urlcookiestring请求cookieheaderarray请求头数据returnCookiebool是否返回cookie### 1. POST方法

[](#1-post方法)

参数类型描述urlstring请求的urldatastring|arraypost数据cookiestring请求cookieheaderarray请求头数据returnCookiebool是否返回cookie

###  Health Score

29

—

LowBetter than 59% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity59

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 ~8 days

Total

4

Last Release

2096d ago

Major Versions

v0.0.2 → v1.0.02020-07-27

### Community

Maintainers

![](https://www.gravatar.com/avatar/51792df61c4655732c37b8b113df621a62bf460becb9872527ed6bc119ed4d97?d=identicon)[fishtailstudio](/maintainers/fishtailstudio)

---

Top Contributors

[![fishtailstudio](https://avatars.githubusercontent.com/u/32082810?v=4)](https://github.com/fishtailstudio "fishtailstudio (7 commits)")

---

Tags

httpgetpostfishtail

### Embed Badge

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

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

###  Alternatives

[phpgt/fetch

Asynchronous HTTP client with promises.

3724.0k3](/packages/phpgt-fetch)[elementaryframework/water-pipe

URL routing framework and requests/responses handler for PHP

254.6k4](/packages/elementaryframework-water-pipe)

PHPackages © 2026

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