/// Access this request's body as raw bytes.
Access this request's body as raw bytes.
Access this request ' s body as raw bytes .
pub async fn bytes(&mut self) -> Result<Vec<u8>> {
        if !self.body_used {
            self.body_used = true;
            return JsFuture::from(self.edge_request.array_buffer()?)
                .await
                .map(|val| js_sys::Uint8Array::new(&val).to_vec())
                .map_err(|e| {
                    Error::JsError(
                        e.as_string()
                            .unwrap_or_else(|| "failed to read array buffer from request".into()),
                    )
                });
        }
        Err(Error::BodyUsed)
    }
pub async fn bytes ( & mut self ) -> Result < Vec < u8 > > { if ! self . body_used { self . body_used = true ; return JsFuture :: from ( self . edge_request . array_buffer ( ) ? ) . await . map ( | val | js_sys :: Uint8Array :: new ( & val ) . to_vec ( ) ) . map_err ( | e | { Error :: JsError ( e . as_string ( ) . unwrap_or_else ( | | " " . into ( ) ) , ) } ) ; } Err ( Error :: BodyUsed ) }
Access this request's body as raw bytes.
Access this request ' s body as raw bytes .
&mut self