A builder to construct the properties of a Request.
To construct a RequestBuilder, refer to the Client
documentation.
Methods
Send the request and receive an answer from the server.
let client = new;
let response = client.get
.header
.send
.await?;
let response = response.text .await?;
Modify a header in the request.
let client = new;
let response = client.get
.header
.send
.await?;
let response = response.text .await?;
Set the request body from bytes.
let client = new;
let response = client.get
.body_bytes
.send
.await?;
let response = response.text .await?;
Disable CORS on fetching the request.
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
let client = new;
let response = client.get
.fetch_mode_no_cors
.send
.await?;
let response = response.text .await?;