pub async fn json<B: DeserializeOwned>(&mut self) -> Result<B> {
        if !self.body_used {
            self.body_used = true;
            return JsFuture::from(self.edge_request.json()?)
                .await
                .map_err(|e| {
                    Error::JsError(
                        e.as_string()
                            .unwrap_or_else(|| "failed to get JSON for body value".into()),
                    )
                })
                .and_then(|val| val.into_serde().map_err(Error::from));
        }

        Err(Error::BodyUsed)
    }
/// Access this request's body encoded as JSON.
Access this request's body encoded as JSON.
Access this request ' s body encoded as JSON .
pub async fn json<B: DeserializeOwned>(&mut self) -> Result<B> {
        if !self.body_used {
            self.body_used = true;
            return JsFuture::from(self.edge_request.json()?)
                .await
                .map_err(|e| {
                    Error::JsError(
                        e.as_string()
                            .unwrap_or_else(|| "failed to get JSON for body value".into()),
                    )
                })
                .and_then(|val| val.into_serde().map_err(Error::from));
        }
        Err(Error::BodyUsed)
    }
pub async fn json < B : DeserializeOwned > ( & mut self ) -> Result < B > { if ! self . body_used { self . body_used = true ; return JsFuture :: from ( self . edge_request . json ( ) ? ) . await . map_err ( | e | { Error :: JsError ( e . as_string ( ) . unwrap_or_else ( | | " " . into ( ) ) , ) } ) . and_then ( | val | val . into_serde ( ) . map_err ( Error :: from ) ) ; } Err ( Error :: BodyUsed ) }
Access this request's body encoded as JSON.
Access this request ' s body encoded as JSON .
&mut self
&mut self