pub struct RawForm(pub Bytes);
Expand description
Extractor that extracts raw form requests.
For GET
requests it will extract the raw query. For other methods it extracts the raw
application/x-www-form-urlencoded
encoded request body.
Example
use axum::{
extract::RawForm,
routing::get,
Router
};
async fn handler(RawForm(form): RawForm) {}
let app = Router::new().route("/", get(handler));
Tuple Fields§
§0: Bytes
Trait Implementations§
source§impl<S, B> FromRequest<S, B, ViaRequest> for RawFormwhere
B: HttpBody + Send + 'static,
B::Data: Send,
B::Error: Into<BoxError>,
S: Send + Sync,
impl<S, B> FromRequest<S, B, ViaRequest> for RawFormwhere
B: HttpBody + Send + 'static,
B::Data: Send,
B::Error: Into<BoxError>,
S: Send + Sync,
§type Rejection = RawFormRejection
type Rejection = RawFormRejection
If the extractor fails it’ll use this “rejection” type. A rejection is
a kind of error that can be converted into a response. Read more