Route

Attributes for routes. Indicates the method used (case sensitive, usually uppercase), whether the method can have a body and the path.

Constructors

this
this(string method, bool hasBody, string[] path)
Undocumented in source.

Members

Variables

hasBody
bool hasBody;

Indicates whether the request can have a body. If set false the body, if present, is always ignored.

method
string method;

Method accepted, conventionally uppercase.

path
string[] path;

Route's path. It is later glued used path separators by the router manager.

Examples

@Route("GET", false, "hello", "world") // GET /hello/world
@Post                                  // POST /
@Delete("resource", "([a-z]+)")        // DELETE /resource/:name

Meta