fist
Types
pub type Route(req_body, res_body) {
Route(
method: http.Method,
path_segments: List(String),
handler: fn(
request.Request(req_body),
dict.Dict(String, String),
) -> response.Response(res_body),
)
}
Constructors
-
Route( method: http.Method, path_segments: List(String), handler: fn( request.Request(req_body), dict.Dict(String, String), ) -> response.Response(res_body), )
Values
pub fn delete(
router: Router(req_body, res_body),
path path: String,
to handler: fn(
request.Request(req_body),
dict.Dict(String, String),
) -> response.Response(res_body),
) -> Router(req_body, res_body)
pub fn get(
router: Router(req_body, res_body),
path path: String,
to handler: fn(
request.Request(req_body),
dict.Dict(String, String),
) -> response.Response(res_body),
) -> Router(req_body, res_body)
pub fn handle(
router: Router(req_body, res_body),
request: request.Request(req_body),
not_found: fn() -> response.Response(res_body),
) -> response.Response(res_body)
pub fn patch(
router: Router(req_body, res_body),
path path: String,
to handler: fn(
request.Request(req_body),
dict.Dict(String, String),
) -> response.Response(res_body),
) -> Router(req_body, res_body)
pub fn post(
router: Router(req_body, res_body),
path path: String,
to handler: fn(
request.Request(req_body),
dict.Dict(String, String),
) -> response.Response(res_body),
) -> Router(req_body, res_body)
pub fn put(
router: Router(req_body, res_body),
path path: String,
to handler: fn(
request.Request(req_body),
dict.Dict(String, String),
) -> response.Response(res_body),
) -> Router(req_body, res_body)