1
0
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:
Nikolay Kim
2018-02-25 20:34:26 +03:00
parent ab5ed27bf1
commit a2b98b31e8
7 changed files with 109 additions and 111 deletions

View File

@@ -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",
}