post<T extends Object> static method

Route post<T extends Object>(
  1. String route,
  2. dynamic controller, {
  3. Object? body,
})

post route

Route.post('path', controller);

[body] is the request body schema for the OpenAPI docs
(eg. a `dox_validation` schema).

Implementation

static Route post<T extends Object>(
  String route,
  dynamic controller, {
  Object? body,
}) {
  return Route()._addRoute(
    HttpRequestMethod.POST,
    Route()._join(route),
    _action<T>(controller),
    body: body,
  );
}