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

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

koine/http
==========

Http objects for handling requests and responses

0.9.3(11y ago)02841MITPHPPHP &gt;=5.3.3

Since Sep 1Pushed 10y agoCompare

[ Source](https://github.com/koinephp/Http)[ Packagist](https://packagist.org/packages/koine/http)[ RSS](/packages/koine-http/feed)WikiDiscussions master Synced 1w ago

READMEChangelogDependencies (4)Versions (6)Used By (1)

Koine Http
----------

[](#koine-http)

Work in progress Http models

Code information:

[![Build Status](https://camo.githubusercontent.com/ecfe3fc5cfcc759d042cc05956ead4680c34a95025b9b5a2cff3f1ff19831f44/68747470733a2f2f7472617669732d63692e6f72672f6b6f696e657068702f487474702e706e673f6272616e63683d6d6173746572)](https://travis-ci.org/koinephp/Http)[![Coverage Status](https://camo.githubusercontent.com/10b4c7d5e418d76c0bd29c25d1da3bd036e077768c224f6a38611e76a097190d/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6b6f696e657068702f487474702f62616467652e706e673f6272616e63683d6d6173746572)](https://coveralls.io/r/koinephp/Http?branch=master)[![Code Climate](https://camo.githubusercontent.com/5bcd9a27c4850d2b8711349973591dc42e1375e2b34319b833a6adfbc294736e/68747470733a2f2f636f6465636c696d6174652e636f6d2f6769746875622f6b6f696e657068702f487474702e706e67)](https://codeclimate.com/github/koinephp/Http)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/70dea34a1d330f9a18fe162c23084de820ed99b5cb1a5ad85f4160049b153475/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6b6f696e657068702f487474702f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/koinephp/Http/?branch=master)

Package information:

[![Latest Stable Version](https://camo.githubusercontent.com/377546982cd2526e69dc947a49b679517cb1ee8943d0fbe39f477c4a1003e9e1/68747470733a2f2f706f7365722e707567782e6f72672f6b6f696e652f687474702f762f737461626c652e737667)](https://packagist.org/packages/koine/http)[![Total Downloads](https://camo.githubusercontent.com/14c2cc8038f692b26cbe19b789091e3e255d98caf7c74bf996c80ed1447a1d30/68747470733a2f2f706f7365722e707567782e6f72672f6b6f696e652f687474702f646f776e6c6f6164732e737667)](https://packagist.org/packages/koine/http)[![Latest Unstable Version](https://camo.githubusercontent.com/473bc43885813bef1e1649eb8cb015ace6380586877ce8a9cc692a482ab57975/68747470733a2f2f706f7365722e707567782e6f72672f6b6f696e652f687474702f762f756e737461626c652e737667)](https://packagist.org/packages/koine/http)[![License](https://camo.githubusercontent.com/c93db3bf976aeb512b2caac1fd14e1976f63fb95d8bdf391638ddd0c34054747/68747470733a2f2f706f7365722e707567782e6f72672f6b6f696e652f687474702f6c6963656e73652e737667)](https://packagist.org/packages/koine/http)[![Dependency Status](https://camo.githubusercontent.com/75e0259378f155eded03d9854a1be4e3c7ba770693e0e76b41a8fadc33911add/68747470733a2f2f67656d6e617369756d2e636f6d2f6b6f696e657068702f487474702e706e67)](https://gemnasium.com/koinephp/Http)

### Usage

[](#usage)

```
namespace Koine\Http;

$env     = new Environment($_SERVER);
$cookies = new Cookies($_COOKIE);
$session = new Session($_SESSION);
$params  = new Params($_REQUEST);

$request = new Request(array(
    'environment' => $env,
    'cookies'     => $cookies,
    'session'     => $session,
    'params'      => $params,
));

$hello = function ($request) {

    $response = new Response(array(
        'cookies' => $cookies,
    ));

    return $response->setBody('Hello Word!');
};

// If page is hello

$hello()->send();

$redirect = function ($request) {

    $response = new Response(array(
          'cookies' => $cookies,
    ));

    return $response->setRedirect('/');
};

// If page is redirect

$redirect()->send();
```

### Installing

[](#installing)

#### Via Composer

[](#via-composer)

Append the lib to your requirements key in your composer.json.

```
{
    // composer.json
    // [..]
    require: {
        // append this line to your requirements
        "koine/http": "dev-master"
    }
}
```

### Alternative install

[](#alternative-install)

- Learn [composer](https://getcomposer.org). You should not be looking for an alternative install. It is worth the time. Trust me ;-)
- Follow [this set of instructions](#installing-via-composer)

### Issues/Features proposals

[](#issuesfeatures-proposals)

[Here](https://github.com/koinephp/http/issues) is the issue tracker.

### Contributing

[](#contributing)

Only TDD code will be accepted. Please follow the [PSR-2 code standard](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-2-coding-style-guide.md).

1. Fork it
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create new Pull Request

### How to run the tests:

[](#how-to-run-the-tests)

```
phpunit --configuration tests/phpunit.xml
```

### To check the code standard run:

[](#to-check-the-code-standard-run)

```
phpcs --standard=PSR2 lib
phpcs --standard=PSR2 tests
```

### Lincense

[](#lincense)

[MIT](MIT-LICENSE)

### Authors

[](#authors)

- [Marcelo Jacobus](https://github.com/mjacobus)

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity52

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

Total

4

Last Release

4254d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/226834?v=4)[Marcelo Jacobus](/maintainers/mjacobus)[@mjacobus](https://github.com/mjacobus)

---

Top Contributors

[![mjacobus](https://avatars.githubusercontent.com/u/226834?v=4)](https://github.com/mjacobus "mjacobus (46 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  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)[nyholm/psr7

A fast PHP7 implementation of PSR-7

1.3k235.4M2.4k](/packages/nyholm-psr7)[pusher/pusher-php-server

Library for interacting with the Pusher REST API

1.5k94.8M293](/packages/pusher-pusher-php-server)[spatie/crawler

Crawl all internal links found on a website

2.8k16.3M52](/packages/spatie-crawler)[react/http

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

78126.4M414](/packages/react-http)

PHPackages © 2026

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