mirror of
https://github.com/tokio-rs/axum.git
synced 2026-08-22 00:00:17 +02:00
Add example showing how to handle empty vs missing query params (#443)
This commit is contained in:
@@ -39,6 +39,11 @@ use std::ops::Deref;
|
||||
///
|
||||
/// If the query string cannot be parsed it will reject the request with a `400
|
||||
/// Bad Request` response.
|
||||
///
|
||||
/// For handling values being empty vs missing see the (query-params-with-empty-strings)[example]
|
||||
/// example.
|
||||
///
|
||||
/// [example]: https://github.com/tokio-rs/axum/blob/main/examples/query-params-with-empty-strings/src/main.rs
|
||||
#[derive(Debug, Clone, Copy, Default)]
|
||||
pub struct Query<T>(pub T);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user