Request¶
Immutable bundle of HTTP request metadata delivered to the server actor.
Constructed by HTTPServer after parsing the request line, headers,
URI, and cookies. Delivered to the actor via the
HTTPServerLifecycleEventReceiver.on_request() callback, making it easy to
pass request metadata to helper functions or store it for later use.
Cookies are automatically parsed from Cookie request headers during
construction. Access them via request'.cookies.get("name") or iterate
with request'.cookies.values().
All components are pre-validated before construction: the method is a known HTTP method, the URI is a parsed RFC 3986 structure, and the version is HTTP/1.0 or HTTP/1.1. Invalid requests are rejected with an error response before reaching the actor.
Constructors¶
create¶
new val create(
method': Method val,
uri': URI val,
version': ((HTTP10 val | HTTP11 val) & _Version val),
headers': Headers val,
cookies': RequestCookies val)
: Request val^
Parameters¶
- method': Method val
- uri': URI val
- version': ((HTTP10 val | HTTP11 val) & _Version val)
- headers': Headers val
- cookies': RequestCookies val
Returns¶
- Request val^