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

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

vakata/http
===========

HTTP Request / Response classes (extending Laminas/Diactoros with a few methods)

3.3.10(7mo ago)26.4k↓78.2%1MITPHPPHP &gt;=8.3.0

Since Jan 10Pushed 7mo ago1 watchersCompare

[ Source](https://github.com/vakata/http)[ Packagist](https://packagist.org/packages/vakata/http)[ Docs](https://github.com/vakata/http)[ RSS](/packages/vakata-http/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependencies (1)Versions (76)Used By (1)

http
====

[](#http)

[![Latest Version on Packagist](https://camo.githubusercontent.com/f275f7bf4d54a965eddadf9bd47e32db5ec88676af18f2597402f582cc3e18c8/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f76616b6174612f687474702e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/vakata/http)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![Build Status](https://camo.githubusercontent.com/addd3e0b484de0c68c39adc1e718e8445b88312bf559b10ea55b06db313d40ec/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f76616b6174612f687474702f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/vakata/http)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/971f30ce8a99e34b5be78b49f825763eaff9a3f11ac3b6577d4784531adb9057/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f76616b6174612f687474702e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/vakata/http)[![Code Coverage](https://camo.githubusercontent.com/187c85e35309d3adeddddde8ae46c31fa90b1a11b6d36dd7dbf699de4d20f008/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f636f7665726167652f672f76616b6174612f687474702e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/vakata/http)

HTTP Request / Response classes, extending Zend Diactoros with just a few helful methods.

Install
-------

[](#install)

Via Composer

```
$ composer require vakata/http
```

Usage
-----

[](#usage)

```
// REQUEST extras
// create a request instance from the current client data
$req = \vakata\http\Request::fromGlobals();
// now you can inspect properties
$req->getQuery('asdf'); // get the "asdf" GET parameter value
$req->getCookie('sessid'); // get the "sessid" cookie value
$req->getPost('pass'); // get the "pass" POST parameter value
$req->getPrefferedResponseLanguage(); // get the preffered response language
// if a parameter is missing a default you pass in can be returned
$req->getQuery('missing', 'default'); // now $a contains "default"
// return values can also be filtered (all filters are listed in the docs)
$req->getPost('user_id', null, 'int');
// you can also get the whole array of parameters
$all = $req->getPost();

// URI extras
$req->getUri()->getSegment(0);
$req->getUri()->linkTo('some/path', [ 'get_param' => 'value' ]);

// RESPONSE extras
$res = new \vakata\http\Response();
$res = $res->expireCookie('sessid');
if ($res->hasCache()) {
    $res = $res->cacheUntil('+7 days');
}
$res = $res->setContentTypeByExtension('json');
```

Read more in the [API docs](docs/README.md)

Testing
-------

[](#testing)

```
$ composer test
```

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

Security
--------

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

Credits
-------

[](#credits)

- [vakata](https://github.com/vakata)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

52

—

FairBetter than 96% of packages

Maintenance63

Regular maintenance activity

Popularity24

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity93

Battle-tested with a long release history

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

Recently: every ~12 days

Total

75

Last Release

225d ago

Major Versions

1.3.13 → 2.0.02018-01-10

2.3.1 → 3.0.02018-10-02

PHP version history (5 changes)1.0.7PHP &gt;=5.4.0

2.0.0PHP &gt;=7.0.0

3.0.1PHP &gt;=7.1.0

3.1.0PHP &gt;=8.0.0

3.3.3PHP &gt;=8.3.0

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/146052?v=4)[Ivan Bozhanov](/maintainers/vakata)[@vakata](https://github.com/vakata)

---

Top Contributors

[![vakata](https://avatars.githubusercontent.com/u/146052?v=4)](https://github.com/vakata "vakata (93 commits)")

---

Tags

httpvakata

### Embed Badge

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

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

###  Alternatives

[guzzlehttp/psr7

PSR-7 message implementation that also provides common utility methods

8.0k1.1B4.0k](/packages/guzzlehttp-psr7)[psr/http-message

Common interface for HTTP messages

7.0k1.1B6.9k](/packages/psr-http-message)[psr/http-factory

PSR-17: Common interfaces for PSR-7 HTTP message factories

1.9k747.1M2.6k](/packages/psr-http-factory)[php-http/httplug

HTTPlug, the HTTP client abstraction for PHP

2.6k325.9M755](/packages/php-http-httplug)[psr/http-client

Common interface for HTTP clients

1.7k731.6M2.9k](/packages/psr-http-client)[symfony/http-client

Provides powerful methods to fetch HTTP resources synchronously or asynchronously

2.0k338.8M4.9k](/packages/symfony-http-client)

PHPackages © 2026

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