PHPackages                             anso/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. [Framework](/categories/framework)
4. /
5. anso/http

ActiveLibrary[Framework](/categories/framework)

anso/http
=========

Http framework for training project.

013PHP

Since Nov 11Pushed 5y ago1 watchersCompare

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

READMEChangelogDependenciesVersions (1)Used By (0)

Http framework for a training project.
--------------------------------------

[](#http-framework-for-a-training-project)

Requirements
------------

[](#requirements)

PHP &gt;= 7.4

Installation
------------

[](#installation)

[anso/http](https://github.com/VioletTrain/http) can be installed via [Composer](https://getcomposer.org).

```
composer require anso/http:dev-master
```

Usage
-----

[](#usage)

A few configuration files must be created and placed in a single folder before instantiating **Application** object and calling **start()** method:

- exception\_handler.php - must return instance of [ExceptionHandler](https://github.com/VioletTrain/contract/blob/master/src/ExceptionHandler.php)
- providers.php - must return array of [Providers](https://github.com/VioletTrain/contract/blob/master/src/Provider.php)that are used to register DI container's bindings.
- routes.php - must return instance of [RouteCollection](https://github.com/VioletTrain/http/blob/master/src/Routing/RouteCollection.php). It contains routes that can be created using [BaseRouter](https://github.com/VioletTrain/http/blob/master/src/Routing/BaseRouter.php). Every route has an [Action](https://github.com/VioletTrain/http/blob/master/src/Contract/Routing/Action.php)that handles [Request](https://github.com/VioletTrain/http/blob/master/src/Request.php)and returns [Response](https://github.com/VioletTrain/http/blob/master/src/Response.php).

Afterwards application can be started like this (/public/index.php):

```
