axum-v0.7.8

tokio-rs/axumaxum-v0.7.8Nov 15, 2024by jplatte

AI Summary

A maintenance release focusing on Server-Sent Events (SSE) serialization and adding support for the CONNECT HTTP method.

Key Highlights

  • Fixed SSE serialization issues with serde_json::RawValue
  • Added method_not_allowed_fallback configuration
  • Added MethodFilter::CONNECT and routing support for CONNECT
  • Added NoContent shortcut for StatusCode::NO_CONTENT

New Features

  • SSE serialization fix
  • MethodFilter::CONNECT support
  • method_not_allowed_fallback
  • NoContent shortcut

Full Release Notes

- **fixed:** Skip SSE incompatible chars of `serde_json::RawValue` in `Event::json_data` ([#2992])
- **added:** Add `method_not_allowed_fallback` to set a fallback when a path matches but there is no handler for the given HTTP method ([#2903])
- **added:** Add `MethodFilter::CONNECT`, `routing::connect[_service]`
  and `MethodRouter::connect[_service]` ([#2961])
- **added:** Add `NoContent` as a self-described shortcut for `StatusCode::NO_CONTENT` ([#2978])

[#2903]: https://github.com/tokio-rs/axum/pull/2903
[#2961]: https://github.com/tokio-rs/axum/pull/2961
[#2978]: https://github.com/tokio-rs/axum/pull/2978
[#2992]: https://github.com/tokio-rs/axum/pull/2992