pub struct RequestInit { /* private fields */ }Expand description
The RequestInit dictionary.
This API requires the following crate features to be activated: RequestInit
Source§
Source
Get the body field of this object.
This API requires the following crate features to be activated: RequestInit
Source§
Source
Change the body field of this object.
This API requires the following crate features to be activated: RequestInit
Source§
Source
Change the body field of this object.
This API requires the following crate features to be activated: RequestInit
Source§
Source
Change the body field of this object.
This API requires the following crate features to be activated: RequestInit
Source§
Source
Change the body field of this object.
This API requires the following crate features to be activated: RequestInit
Source§
Source
Change the body field of this object.
This API requires the following crate features to be activated: RequestInit
Source§
Source
Change the body field of this object.
This API requires the following crate features to be activated: RequestInit
Source§
Source
Change the body field of this object.
This API requires the following crate features to be activated: RequestInit
Source§
Source
Change the body field of this object.
This API requires the following crate features to be activated: RequestInit
Source§
Source
Change the body field of this object.
This API requires the following crate features to be activated: RequestInit
Source§
Source
Get the cache field of this object.
This API requires the following crate features to be activated: RequestCache, RequestInit
Source§
Source
Change the cache field of this object.
This API requires the following crate features to be activated: RequestCache, RequestInit
Source§
Source
Get the credentials field of this object.
This API requires the following crate features to be activated: RequestCredentials, RequestInit
Source§
Source
Change the credentials field of this object.
This API requires the following crate features to be activated: RequestCredentials, RequestInit
Source§
Get the headers field of this object.
This API requires the following crate features to be activated: RequestInit
Source§
Change the headers field of this object.
This API requires the following crate features to be activated: RequestInit
Source§
Change the headers field of this object.
This API requires the following crate features to be activated: RequestInit
Source§
Change the headers field of this object.
This API requires the following crate features to be activated: RequestInit
Source§
Change the headers field of this object.
This API requires the following crate features to be activated: RequestInit
Source§
Source
Get the integrity field of this object.
This API requires the following crate features to be activated: RequestInit
Source§
Source
Change the integrity field of this object.
This API requires the following crate features to be activated: RequestInit
Source§
Source
Get the method field of this object.
This API requires the following crate features to be activated: RequestInit
Source§
Source
Change the method field of this object.
This API requires the following crate features to be activated: RequestInit
Source§
Source
Get the mode field of this object.
This API requires the following crate features to be activated: RequestInit, RequestMode
Source§
Source
Change the mode field of this object.
This API requires the following crate features to be activated: RequestInit, RequestMode
Source§
Source
Get the observe field of this object.
This API requires the following crate features to be activated: ObserverCallback, RequestInit
Source§
Source
Change the observe field of this object.
This API requires the following crate features to be activated: ObserverCallback, RequestInit
Source§
Source
Change the observe field of this object.
This API requires the following crate features to be activated: ObserverCallback, RequestInit
Source§
Source
Change the observe field of this object.
This API requires the following crate features to be activated: ObserverCallback, RequestInit
Source§
Source
Get the redirect field of this object.
This API requires the following crate features to be activated: RequestInit, RequestRedirect
Source§
Source
Change the redirect field of this object.
This API requires the following crate features to be activated: RequestInit, RequestRedirect
Source§
Source
Get the referrer field of this object.
This API requires the following crate features to be activated: RequestInit
Source§
Source
Change the referrer field of this object.
This API requires the following crate features to be activated: RequestInit
Source§
Source
Get the referrerPolicy field of this object.
This API requires the following crate features to be activated: ReferrerPolicy, RequestInit
Source§
Source
Change the referrerPolicy field of this object.
This API requires the following crate features to be activated: ReferrerPolicy, RequestInit
Source§
Source
Get the signal field of this object.
This API requires the following crate features to be activated: AbortSignal, RequestInit
Source§
Source
Change the signal field of this object.
This API requires the following crate features to be activated: AbortSignal, RequestInit
Source§
Source
Construct a new RequestInit.
This API requires the following crate features to be activated: RequestInit
👎Deprecated: Use set_body() instead.
👎Deprecated: Use set_cache() instead.
👎Deprecated: Use set_credentials() instead.
👎Deprecated: Use set_headers() instead.
👎Deprecated: Use set_integrity() instead.
👎Deprecated: Use set_method() instead.
👎Deprecated: Use set_mode() instead.
👎Deprecated: Use set_observe() instead.
👎Deprecated: Use set_redirect() instead.
👎Deprecated: Use set_referrer() instead.
👎Deprecated: Use set_referrer_policy() instead.
👎Deprecated: Use set_signal() instead.
Source
The constructor property returns a reference to the Object constructor
function that created the instance object.
Source 👎Deprecated: Use Object::hasOwn instead.
Object::hasOwn instead.The hasOwnProperty() method returns a boolean indicating whether the
object has the specified property as its own property (as opposed to
inheriting it).
Source
The isPrototypeOf() method checks if an object exists in another
object’s prototype chain.
Source
The propertyIsEnumerable() method returns a Boolean indicating
whether the specified property is enumerable.
Source
The toLocaleString() method returns a string representing the object.
This method is meant to be overridden by derived objects for
locale-specific purposes.
Source
The valueOf() method returns the primitive value of the
specified object.
Source
Returns the f64 value of this JS value if it’s an instance of a
number.
If this JS value is not an instance of a number then this returns
None.
Source
Tests whether this JS value is a JS string.
Source
If this JS value is a string value, this function copies the JS string
value into Wasm linear memory, encoded as UTF-8, and returns it as a
Rust String.
To avoid the copying and re-encoding, consider the
JsString::try_from() function from js-sys
instead.
If this JS value is not an instance of a string or if it’s not valid
utf-8 then this returns None.
§UTF-16 vs UTF-8
JavaScript strings in general are encoded as UTF-16, but Rust strings
are encoded as UTF-8. This can cause the Rust string to look a bit
different than the JS string sometimes. For more details see the
documentation about the str type which contains a few
caveats about the encodings.
Source
Returns the bool value of this JS value if it’s an instance of a
boolean.
If this JS value is not an instance of a boolean then this returns
None.
Source
Tests whether this JS value is null
Source
Tests whether this JS value is undefined
Source
Tests whether this JS value is null or undefined
Source
Tests whether the type of this JS value is symbol
Source
Tests whether typeof self == "object" && self !== null.
Source
Tests whether this JS value is an instance of Array.
Source
Tests whether the type of this JS value is function.
Source
Tests whether the type of this JS value is bigint.
Source
Applies the binary / JS operator on two JsValues, catching and returning any RangeError thrown.