brnc/http-message-subset

This package is abandoned and no longer maintained. No replacement package was suggested.

Interfaces for subsets of PSR-7

v0.0.4 2018-11-24 16:09 UTC

This package is not auto-updated.

Last update: 2020-08-22 15:29:04 UTC


README

For cases when PSR-7 is too much. And only a limited subset of the implemented methods is needed, possible or desired.

As a beginning only header related methods of the message are covered.

Definition in terms of RFC-7230

RFC-7230 as well as RFC-2616 defines the HTTP message as:

HTTP-message   = start-line
                 *( header-field CRLF )
                 CRLF
                 [ message-body ]

while the start-lines are defined as:

start-line     = request-line / status-line
request-line   = method SP request-target SP HTTP-version CRLF
status-line    = HTTP-version SP status-code SP reason-phrase CRLF

This packages now is referring to

  • header-field·s as Headers
  • Aggregation of start-line and header-field as Head
  • header-field·s and the HTTP-version as CommonHead
  • The message-body will be the Body
  • everything together the Message