Routes
This page summarizes how to declare routes.
Please see Mandarine MVC Controllers before continuing.
Declaring routes
Routes are declared by using specific decorators, these decorators have two parameters:
Route (string):
Required
Route of the endpoint
If the parent controller contains a base route, then they will be unified.
options (Mandarine.MandarineMVC.Routing.RoutingOptions):
Optional
Contains:
responseStatus (HttpStatusCode): Default response status for endpoint.
Types of routes available
GET
POST
PUT
HEAD
DELETE
OPTIONS
PATCH
Usage
Syntax:
Note that in the example above we are only using GET, but all the route types listed above are available to be used. For example, if you would like to use POST instead of GET, it would be:
Last updated