Simple wrapper to read and decode an HTTP header from `In', call
:Goal while watching for exceptions and send the result to the
stream `Out'.
The goal is assumed to write the reply to current_output preceded
by an HTTP header, closed by a blank line. The header must
contain a Content-type: <type> line. It may optionally contain a
line Transfer-encoding: chunked to request chunked encoding.
Options:
- request(-Request)
- Return the full request to the caller
- byte_count(-Count)
- Stream In byte_count/2 after reading the request.
- peer(+Peer)
- IP address of client
- Arguments:
-
| Close | - Unified to one of close, Keep-Alive,
spawned(ThreadId) or switch_protocol(:Goal, +SwitchOptions) |