brnc / http-message-subset
此包已被弃用且不再维护。未建议替代包。
PSR-7 子集接口
v0.0.4
2018-11-24 16:09 UTC
Requires
- php: ^5.5 || ^7.0
This package is not auto-updated.
Last update: 2020-08-22 15:29:04 UTC
README
当PSR-7功能过多时。并且只需要实现方法的有限子集时,可能是或期望的。
仅作为开始,只覆盖与消息相关的头方法。
基于RFC-7230的定义
RFC-7230以及RFC-2616定义HTTP消息为
HTTP-message = start-line
*( header-field CRLF )
CRLF
[ message-body ]
而开始行定义为
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
此包现在引用的是
header-field
·s作为头部start-line
和header-field
的聚合作为头部header-field
·s和HTTP-version
作为公共头部message-body
将是主体- 所有这些合在一起就是消息