# HTTP Methods

# Auto-endpoints

The default behavior is to automatically generate HEAD endpoints for all GET routes, and OPTIONS endpoints for all routes. Additionally, there is the option to automatically generate TRACE endpoints. However, these are not enabled by default.

    # Additional method support

    Vanilla Sanic allows you to build endpoints with the following HTTP methods:

    See MDN Web Docs (opens new window) for more.

    There are, however, two more "standard" HTTP methods: TRACE and CONNECT. Sanic Extensions will allow you to build endpoints using these methods, which would otherwise not be allowed.

    It is worth pointing out that this will NOT enable convenience methods: @app.trace or @app.connect. You need to use @app.route as shown in the example here.

    @app.route("/", methods=["trace", "connect"])
    async def handler(_):
        return empty()
    
    MIT Licensed
    Copyright © 2018-present Sanic Community Organization

    ~ Made with ❤️ and ☕️ ~