data Bezel::Runner

include HTTP::Handler

An endpoint's handler: its plugs and the application, made once and shared by the server's connections.

src/endpoint.qz:53

Methods

def endpoint -> Type[Bezel::Endpoint]

src/endpoint.qz:53

def plugs -> Array[Bezel::Plug]

src/endpoint.qz:53

def app -> Bezel::App

src/endpoint.qz:53

def to_h -> Hash[Symbol, Object]

The fields as a Hash, by name.

src/endpoint.qz:54

def with(*, endpoint: Type[Bezel::Endpoint] = …, plugs: Array[Bezel::Plug] = …, app: Bezel::App = …) -> Bezel::Runner

A copy with the fields given replaced.

src/endpoint.qz:54

def call(req: HTTP::Server::Request) -> HTTP::Server::Response

The response to req. An HTTP::Error raised is answered with its status; another StandardError with a 500.

from HTTP::Handler

src/endpoint.qz:56

def answer(conn: Bezel::Conn, error: StandardError) -> HTTP::Server::Response

The error page for error, with the headers the plugs set on conn (the request id, security headers) but DROPPED.

src/endpoint.qz:89