pub fn new(uri: &str, method: Method) -> Result<Self> {
        EdgeRequest::new_with_str_and_init(uri, EdgeRequestInit::new().method(&method.to_string()))
            .map(|req| {
                let mut req: Request = req.into();
                req.immutable = false;
                req
            })
            .map_err(|e| {
                Error::JsError(
                    e.as_string()
                        .unwrap_or_else(|| "invalid URL or method for Request".to_string()),
                )
            })
    }
/// Construct a new `Request` with an HTTP Method.
Construct a new `Request` with an HTTP Method.
Construct a new ` Request ` with an HTTP Method .
pub fn new(uri: &str, method: Method) -> Result<Self> {
        EdgeRequest::new_with_str_and_init(uri, EdgeRequestInit::new().method(&method.to_string()))
            .map(|req| {
                let mut req: Request = req.into();
                req.immutable = false;
                req
            })
            .map_err(|e| {
                Error::JsError(
                    e.as_string()
                        .unwrap_or_else(|| "invalid URL or method for Request".to_string()),
                )
            })
    }
pub fn new ( uri : & str , method : Method ) -> Result < Self > { EdgeRequest :: new_with_str_and_init ( uri , EdgeRequestInit :: new ( ) . method ( & method . to_string ( ) ) ) . map ( | req | { let mut req : Request = req . into ( ) ; req . immutable = false ; req } ) . map_err ( | e | { Error :: JsError ( e . as_string ( ) . unwrap_or_else ( | | " " . to_string ( ) ) , ) } ) }
Construct a new `Request` with an HTTP Method.
Construct a new ` Request ` with an HTTP Method .
uri
&str
method
Method
uri
&str
method
Method