Pudu programming language
Menu

Std.Http.Server.Route.on

1 declaration

fn

on: Std.Http.Method -> Str -> fn(Std.Http.Server.Route.Request) -> Std.Http.Response -> Std.Http.Server.Route.Route

This is a callable function.

What it does

One route, as a value.

A route is built on its own rather than by adding to a router, so a list of

them reads down the page in the order they are tried. Building a router by

wrapping it in itself once per route puts the last route written outermost,

which reads backwards and nests one level deeper for every route added.

Read the signature

  • The text after the name is the type checked by Pudu.
  • Read arrows from left to right: inputs come first, and the final type is returned.

Back to Std.Http.Server.RouteSearch related declarations