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 {
      @httpPut
      Future<Response> updateUser(@HTTPPath("id") int id) async
        => new Response.ok(setUserFromBody(id, request.body.asMap()));
    }

Implementation

const HTTPMethod httpPut = const HTTPMethod("put")