tower-web
tower-web copied to clipboard
HTTP method as an argument of resource's method
In our use case we simply need to sign and redirect user's HEAD or GET request and the HTTP method is only used in the signature computation. An HTTP handler is the same for any HTTP method. Here is how it looks like. If I'm understand right, there is currently no way to implement an HTTP handler that match any HTTP method. Perhaps we may introduce #[path("/")] macro or something to make the code for such cases a little bit cleaner.
May relate to this issue.