2017 © Pedro Peláez
 

library http-message

Psr7 Http Message Utilities

image

krak/http-message

Psr7 Http Message Utilities

  • Thursday, April 27, 2017
  • by ragboyjr
  • Repository
  • 1 Watchers
  • 0 Stars
  • 805 Installations
  • PHP
  • 2 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 5 Versions
  • 0 % Grown

The README.md

Http Message Utilities

Simple utilities for the psr http message (psr7) specification., (*1)

Headers

We provide several utilities for parsing special headers., (*2)

Each header class is named after the specific http header and has the following functions for parsing and signing., (*3)

Here's an example using the AcceptHeader class, (*4)

<?php

use Krak\HttpMessage;

// grab from a psr http message
$accept_header = HttpMessage\AcceptHeader::fromHttpMessage($psr_req);
// parse from a string
$accept_header = HttpMessage\AcceptHeader::fromString('text/*;q=0.1,text/html;q=0.2');

// You can then sign an http message with the header, which will write the value of the header into the req.
$req = $accept_header->signHttpMessage($req);

// You can also export the header as a string
echo $accept_header;

We provide abstractions with the following classes:, (*5)

  • Krak\HttpMessage\AuthorizationHeader
  • Krak\HttpMessage\AcceptHeader
  • Krak\HttpMessage\ContentTypeHeader

Matchers

The Krak\HttpMessage\Match directory holds functional utilities for creating matchers for http message requests., (*6)

The Versions

27/04 2017

dev-master

9999999-dev

Psr7 Http Message Utilities

  Sources   Download

MIT

The Development Requires

27/04 2017

v0.1.3

0.1.3.0

Psr7 Http Message Utilities

  Sources   Download

MIT

The Development Requires

21/07 2016

v0.1.2

0.1.2.0

Psr7 Http Message Utilities

  Sources   Download

MIT

The Development Requires

12/07 2016

v0.1.1

0.1.1.0

Psr7 Http Message Utilities

  Sources   Download

MIT

The Development Requires

11/07 2016

v0.1.0

0.1.0.0

Psr7 Http Message Utilities

  Sources   Download

MIT

The Development Requires