mirror of
https://github.com/fafhrd91/actix-web
synced 2025-08-30 00:29:29 +02:00
refactor payload related futures for HttpRequest
This commit is contained in:
@@ -86,10 +86,10 @@ pub struct JsonBody<S, T: DeserializeOwned>{
|
||||
impl<S, T: DeserializeOwned> JsonBody<S, T> {
|
||||
|
||||
/// Create `JsonBody` for request.
|
||||
pub fn from_request(req: &HttpRequest<S>) -> Self {
|
||||
pub fn from_request(req: HttpRequest<S>) -> Self {
|
||||
JsonBody{
|
||||
limit: 262_144,
|
||||
req: Some(req.clone()),
|
||||
req: Some(req),
|
||||
fut: None,
|
||||
ct: "application/json",
|
||||
}
|
||||
|
Reference in New Issue
Block a user