httpPut top-level constant

const httpPut = const HTTPMethod("put")

Binds an HTTPController responder method to HTTP PUT.

HTTPController methods with this metadata will be invoked for HTTP PUT requests if their HTTPPath arguments match the HTTPRequestPath.variables of the incoming request. For example, the following controller invokes updateUser when it receives an HTTP PUT request:

    class UserController extends HTTPController {
      Future<Response> updateUser(@HTTPPath("id") int id) async
        => new Response.ok(setUserFromBody(id, request.body.asMap()));


const HTTPMethod httpPut = const HTTPMethod("put")