Struct worker::RequestInit [−][src]
pub struct RequestInit {
pub body: Option<JsValue>,
pub headers: Headers,
pub cf: CfProperties,
pub method: Method,
pub redirect: RequestRedirect,
}
Expand description
Optional options struct that contains settings to apply to the Request
.
Fields
body: Option<JsValue>
Currently requires a manual conversion from your data into a wasm_bindgen::JsValue
.
headers: Headers
Headers associated with the outbound Request
.
cf: CfProperties
Cloudflare-specific properties that can be set on the Request
that control how Cloudflare’s
edge handles the request.
method: Method
The HTTP Method used for this Request
.
redirect: RequestRedirect
The redirect mode to use: follow, error, or manual. The default for a new Request object is follow. Note, however, that the incoming Request property of a FetchEvent will have redirect mode manual.
Implementations
Trait Implementations
Performs the conversion.