Spikard. Conn
(spikard v0.16.0-rc.3)
Copy Markdown
HTTP request context passed to handlers.
Contains path parameters, query parameters, headers, cookies, and body data. Handlers receive this struct as the single argument and use it to access request data.
Summary
Functions
Get a cookie value.
Get a header value.
Get a path parameter value.
Get a query parameter value.
Types
@type t() :: %Spikard.Conn{ body: any(), cookies: map(), headers: map(), method: String.t(), path: String.t(), path_params: map(), query_params: map(), raw_body: binary() | nil }
HTTP request context.
Fields:
- path_params: Map of path parameters extracted from the URL
- query_params: Map of query parameters
- headers: Map of HTTP headers
- cookies: Map of HTTP cookies
- body: Parsed request body (JSON or other format)
- raw_body: Raw request body bytes
- method: HTTP method (GET, POST, etc.)
- path: Request path