Add RequestBuilder::fetch_mode_no_cors()
This commit is contained in:
@@ -353,6 +353,19 @@ impl RequestBuilder {
|
||||
self
|
||||
}
|
||||
|
||||
/// Disable CORS on fetching the request.
|
||||
///
|
||||
/// # WASM
|
||||
///
|
||||
/// This option is only effective with WebAssembly target.
|
||||
///
|
||||
/// The [request mode][mdn] will be set to 'no-cors'.
|
||||
///
|
||||
/// [mdn]: https://developer.mozilla.org/en-US/docs/Web/API/Request/mode
|
||||
pub fn fetch_mode_no_cors(self) -> RequestBuilder {
|
||||
self
|
||||
}
|
||||
|
||||
/// Build a `Request`, which can be inspected, modified and executed with
|
||||
/// `Client::execute()`.
|
||||
pub fn build(self) -> crate::Result<Request> {
|
||||
|
||||
Reference in New Issue
Block a user