Configuration.decodeHTTPRequest()
Description
Appends a decodeHTTPRequest filter to the current pipeline layout.
A decodeHTTPRequest filter decodes HTTP/1 request messages from a raw byte stream.
- INPUT - Data stream to decode HTTP/1 request messages from.
- OUTPUT - HTTP/1 request Messages decoded from the input Data stream.
After decoding, the output Message has:
- head
- protocol - Can be "HTTP/1.0" or "HTTP/1.1"
- method - HTTP method such as "GET" and "POST"
- path - Requested URI
- headers - Header fields
- body - Message body
Header names are all converted to lowercase. So "Host" becomes "host" and "Content-Type" becomes "content-type".
This filter only supports HTTP/1.x. For compatibility with HTTP/2, check out demuxHTTP().
Syntax
pipy().pipeline().decodeHTTPRequest()
Parameters
decodeHTTPRequest(handler?)
handler?
No description
Return Value
The same Configuration object.