https://github.com/seriousbug/actix-web-query-method-middleware
An Actix Web middleware that allows you to reroute `POST` requests to other methods like `PUT` or `DELETE` using a query parameter.
https://github.com/seriousbug/actix-web-query-method-middleware
Last synced: 12 months ago
JSON representation
An Actix Web middleware that allows you to reroute `POST` requests to other methods like `PUT` or `DELETE` using a query parameter.
- Host: GitHub
- URL: https://github.com/seriousbug/actix-web-query-method-middleware
- Owner: SeriousBug
- License: mit
- Created: 2022-09-26T02:58:57.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-05-11T04:20:11.000Z (about 3 years ago)
- Last Synced: 2024-11-19T15:00:32.335Z (over 1 year ago)
- Language: Rust
- Size: 29.3 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: Readme.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://crates.io/crates/actix-web-query-method-middleware)
[](https://docs.rs/actix-web-query-method-middleware/latest/actix_web_query_method_middleware/)
[](https://github.com/SeriousBug/actix-web-query-method-middleware/actions/workflows/test.yml)
[](https://app.codecov.io/gh/SeriousBug/actix-web-query-method-middleware)
An Actix Web middleware that allows you to reroute `POST` requests to other
methods like `PUT` or `DELETE` using a query parameter.
This is useful in HTML forms where you can't use methods other than `GET` or
`POST`. By adding this middleware to your server, you can submit the form to
endpoints with methods other than `POST` by adding a query parameter like
`/your/url?_method=PUT`.
For example:
```html
```
See the [crate documentation](https://docs.rs/actix-web-query-method-middleware/latest/actix_web_query_method_middleware/) for details.
## Development
If you have any suggestions or find any bugs, feel free to open a bug report. If
you'd like to contribute, you can send a pull request. If you are thinking of
making a big change, you should open an issue first to discuss the changes to
avoid wasted effort.
### Testing
Run `cargo test` to test things. If you want to see the debug log output, you
can also use `RUST_LOG=debug cargo test` to see debug logs for failed tests.