read_json

Function read_json 

Source
pub async fn read_json<T: DeserializeOwned>(
    req: &mut Request<Body>,
) -> Result<T>
Expand description

Read JSON body into T and keep body available by re-inserting bytes. Read JSON body as T, and put bytes back so the body stays readable.