howdy/param
Typed extraction of path parameters. Each function takes a continuation
so it can be used with use. When the parameter is missing or has the
wrong shape a 400 response is returned and the continuation never runs.
fn by_id(ctx: Context) {
use id <- param.int(ctx, "id")
...
}
Values
pub fn int(
ctx: context.Context(guarded),
name: String,
next: fn(Int) -> response.Response(content.Content),
) -> response.Response(content.Content)
Extract an integer parameter.
pub fn string(
ctx: context.Context(guarded),
name: String,
next: fn(String) -> response.Response(content.Content),
) -> response.Response(content.Content)
Extract a string parameter.