Defining Routes

How to define routes.

You define routes withe the @ character followed by an HTTP method (e.g. GET, POST, PUT, etc.). Routes work like functions.

# A basic GET route.
@get(/api/v1/route_1’):
    # code goes here...

# A route with query parameters.
@post(/api/v1/route_2/<param_1>):
    print(param_1)
circle-info

Parameters are defined with angle brackets (< & >).

Last updated