Skip to main content

Module handler

Module handler 

Source

Structs§

HandlerFunc
ServeMux
HTTP request multiplexer. Port of Go’s http.ServeMux (Go 1.22+).

Traits§

Handler
The core handler interface. Port of Go’s http.Handler.

Functions§

default_serve_mux
Return a reference to the global DefaultServeMux.
file_server
Serve files from the filesystem rooted at root. Port of Go’s http.FileServer.
handle
Register handler on the DefaultServeMux. Port of Go’s http.Handle.
handle_func
Register a function on the DefaultServeMux. Port of Go’s http.HandleFunc.
handler_func
Convenience constructor.
not_found_handler
Returns a Handler that always replies 404.
strip_prefix
Strips prefix from the request path before forwarding to handler. Port of Go’s http.StripPrefix.
timeout_handler
Wraps handler with a per-request deadline.