Download the PHP package phpixie/http without Composer
On this page you can find all versions of the php package phpixie/http. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Package http
Short Description HTTP library for PHPixie, implements the PSR-7 standard
License BSD-3-Clause
Homepage http://phpixie.com
Informations about the package http
HTTP
PHPixie HTTP library
This library handles HTTP protocol asbtraction and implements the PSR-7 implemenetation. In addition to implementing the standard it provides wrappers for Requests and Responses and also abstractions for Cookies and Session. Since these wrappers work with any PSR-7 implementation it will now be possible to run PHPixie in some interesting environments, like inside ReactPHP etc. You can also use these abstractions to create your own PSR-7 compatible microframework.
Here is a quick demo:
Requests
Response
Apart from provideing a Response wrapper, PHPixie HTTP also can simplify building some frequently used responses, like JSON responses with proper headers and file downloads.
Context
Another important part is managing users Cookies and Session. Frequently you would access them outside of the request processing, for example in you authroization library. Also for non0standard environments, like in ReactPHP you would need special handlers for modifying the session. That’s why PHPixie separates these into a Context instance. You can store it separately, allowing users to modify cookies independently and then merge them with the Response. It’s rather easy:
To obtain the HTTP Context when using the PHPixie framework, you need to get it from the framework context:
Also you can just use the PSR-7 implementations without PHPixie wrappers:
As all the other PHPixie libraries it is 100% unit tested and has a high codeclimate score (actually perfect score in this case)