Skip to content

Request

[Source]

Immutable bundle of HTTP request metadata delivered to the server actor.

Constructed by HTTPServer after parsing the request line, headers, and URI. 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.

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.

class val Request

Constructors

create

[Source]

new val create(
  method': Method val,
  uri': URI val,
  version': ((HTTP10 val | HTTP11 val) & _Version val),
  headers': Headers val)
: Request val^

Parameters

Returns


Public fields

let method: Method val

[Source]


let uri: URI val

[Source]


let version: ((HTTP10 val | HTTP11 val) & _Version val)

[Source]


let headers: Headers val

[Source]