PHP Classes

HTTP Abstraction: Parse HTTP requests and parse responses with PSR-7

Recommend this page to a friend!
  Info   Documentation   View files Files   Install with Composer Install with Composer   Download Download   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
Not enough user ratingsTotal: 172 All time: 8,822 This week: 43Up
Version License PHP version Categories
http-abstraction 1.0.17MIT/X Consortium ...5HTTP, PHP 5, PSR
Description 

Author

This package can parse HTTP requests and parse responses with PSR-7.

It provides several classes that implement interfaces defined in the PSR-7 specification for processing HTTP requests and responses.

Picture of Payam Naderi
  Performance   Level  
Innovation award
Innovation award
Nominee: 2x

 

Documentation

HttpRequest

Build Http Request From Builder

Builder Support String or Array Settings.

$reqStr =<<< DOC
GET /api/v1.1/page/search HTTP/1.1
Host: site.com
Cache-Control: no-cache
DOC;

$request = new \Poirot\Http\HttpRequest(
    new BuildHttpRequest(BuildHttpRequest::parseWith($reqStr))
);

Headers

HeaderFactory::of('WWW-Authenticate: Basic realm="admin_panel"');
HeaderFactory::of(['WWW-Authenticate', 'Basic realm="admin_panel"']);
// options of specific header as plugin
HeaderFactory::of('WWW-Authenticate' => ['header_line' => 'Basic realm="admin_panel"']);

  Files folder image Files (40)  
File Role Description
Files folder imageHeader (5 files)
Files folder imageHttpMessage (3 directories)
Files folder imageInterfaces (5 files, 1 directory)
Files folder imagePsr (4 files)
Plain text file aHttpMessage.php Class Class source
Accessible without login Plain text file composer.json Data Auxiliary data
Plain text file HttpRequest.php Class Class source
Plain text file HttpResponse.php Class Class source
Plain text file HttpStatus.php Class Class source
Accessible without login Plain text file LICENSE Lic. License text
Plain text file MimeResolver.php Class Class source
Accessible without login Plain text file README.md Doc. Documentation
Plain text file _functions.php Class Class source

The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page.
Install with Composer Install with Composer
 Version Control Unique User Downloads Download Rankings  
 100%
Total:172
This week:0
All time:8,822
This week:43Up