Skip to content

UpgradeRequest

[Source]

A parsed HTTP upgrade request from a WebSocket client.

Provides access to the request URI and headers. Header lookups are case-insensitive per HTTP/1.1 (RFC 7230 Section 3.2).

class val UpgradeRequest

Constructors

create

[Source]

Create an upgrade request with the given URI and headers.

new val create(
  uri': String val,
  headers': Array[(String val , String val)] val)
: UpgradeRequest val^

Parameters

Returns


Public fields

let uri: String val

[Source]


Public Functions

[Source]

Look up a header value by name (case-insensitive).

Returns the first matching header value, or None if not found. Header names are stored pre-lowered by _HandshakeParser, so this only needs to lower the lookup key.

fun box header(
  name: String val)
: (String val | None val)

Parameters

Returns