HTTPRequest¶
An HTTP request to be sent by HTTPClientConnection.
Holds the method, path, headers, and optional body. The connection layer
auto-sets Host and Content-Length headers during serialization if they
are not already present — callers only need to set them explicitly when
overriding the defaults.
No validation is performed on the request — the client sends whatever the caller asks for.
Constructors¶
create¶
Create an HTTP request with the given method, path, headers, and body.
new val create(
method': Method val,
path': String val,
headers': Headers val = recover,
body': (Array[U8 val] val | None val) = reference)
: HTTPRequest val^
Parameters¶
- method': Method val
- path': String val
- headers': Headers val = recover
- body': (Array[U8 val] val | None val) = reference
Returns¶
- HTTPRequest val^