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: 171 All time: 8,830 This week: 455Up
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  
Name: Payam Naderi <contact>
Classes: 15 packages by
Country: United States United States
Age: 41
All time rank: 2016286 in United States United States
Week rank: 49 Up6 in United States United States Up
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

  Files folder image Files (40)  /  Header  
File Role Description
  Plain text file aHeaderHttp.php Class Class source
  Plain text file CollectionHeader.php Class Class source
  Plain text file FactoryHttpHeader.php Class Class source
  Plain text file HeaderLine.php Class Class source
  Plain text file PluginsHttpHeader.php Class Class source

  Files folder image Files (40)  /  HttpMessage  
File Role Description
Files folder imageInterfaces (1 file)
Files folder imageRequest (2 files, 1 directory)
Files folder imageResponse (2 files, 2 directories)

  Files folder image Files (40)  /  HttpMessage  /  Interfaces  
File Role Description
  Plain text file iPluginHttp.php Class Class source

  Files folder image Files (40)  /  HttpMessage  /  Request  
File Role Description
Files folder imagePlugin (4 files)
  Plain text file BuildHttpRequest.php Class Class source
  Plain text file StreamBodyMultiPart.php Class Class source

  Files folder image Files (40)  /  HttpMessage  /  Request  /  Plugin  
File Role Description
  Plain text file aPluginRequest.php Class Class source
  Plain text file MethodType.php Class Class source
  Plain text file ParseRequestData.php Class Class source
  Plain text file PhpServer.php Class Class source

  Files folder image Files (40)  /  HttpMessage  /  Response  
File Role Description
Files folder imageHeader (1 file)
Files folder imagePlugin (3 files)
  Plain text file BuildHttpResponse.php Class Class source
  Plain text file DataParseResponsePhp.php Class Class source

  Files folder image Files (40)  /  HttpMessage  /  Response  /  Header  
File Role Description
  Accessible without login Plain text file ETag.php Aux. Auxiliary script

  Files folder image Files (40)  /  HttpMessage  /  Response  /  Plugin  
File Role Description
  Plain text file aPluginResponse.php Class Class source
  Plain text file PhpServer.php Class Class source
  Plain text file Status.php Class Class source

  Files folder image Files (40)  /  Interfaces  
File Role Description
Files folder imageRespec (4 files)
  Plain text file iHeader.php Class Class source
  Plain text file iHeaders.php Class Class source
  Plain text file iHttpMessage.php Class Class source
  Plain text file iHttpRequest.php Class Class source
  Plain text file iHttpResponse.php Class Class source

  Files folder image Files (40)  /  Interfaces  /  Respec  
File Role Description
  Plain text file iRequestAware.php Class Class source
  Plain text file iRequestProvider.php Class Class source
  Plain text file iResponseAware.php Class Class source
  Plain text file iResponseProvider.php Class Class source

  Files folder image Files (40)  /  Psr  
File Role Description
  Plain text file aMessageBridgeInPsr.php Class Class source
  Plain text file RequestBridgeInPsr.php Class Class source
  Plain text file ResponseBridgeInPsr.php Class Class source
  Plain text file ServerRequestBridgeInPsr.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:171
This week:0
All time:8,830
This week:455Up