method
Changes the HTTP method on the request.
Syntax
method [<matcher>] <method>
- <method> is the HTTP method to change the request to.
Examples
Change the method for all requests under /api to POST:
method /api* POST
© 2015-2025 Matthew Holt and The Caddy Authors
Licensed under the Apache License 2.0.
Caddy is a registered trademark of Stack Holdings GmbH.
https://caddyserver.com/docs/caddyfile/directives/method