axum-accept
Typed accept negotiation for axum, following RFC7231.
Example
use ;
use AcceptExtractor;
use json;
async
Edge cases
Setting a default is recommended as it indicates behaviour more explicitly in your code. This is how axum-accept behaves on edge cases:
| Accept | Has default | No default |
|---|---|---|
<empty> |
Default variant | HTTP 406 (Not Acceptable) |
*/* |
Default variant | First variant |
License
Licensed under either of
- Apache License, Version 2.0, (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
at your option.