Skip to content

Interface: BrowserRequestOptions ​

Defined in: api/rust-fetch.d.ts:68

fetch() options for browsers, Web Workers and other fetch() runtimes (Deno, Bun). Node.js requests don't use them; they're still validated there.

Extended by ​

Properties ​

cache? ​

optional cache?: "default" | "no-store" | "reload" | "no-cache" | "force-cache" | "only-if-cached"

Defined in: api/rust-fetch.d.ts:74

How the browser's HTTP cache is used


credentials? ​

optional credentials?: "omit" | "same-origin" | "include"

Defined in: api/rust-fetch.d.ts:70

Send cookies and HTTP authentication: same-origin (default), include (also cross-origin) or omit


integrity? ​

optional integrity?: string

Defined in: api/rust-fetch.d.ts:83

Subresource integrity metadata, e.g. sha384-…


keepalive? ​

optional keepalive?: boolean

Defined in: api/rust-fetch.d.ts:76

Let the request outlive the page, e.g. for analytics on unload (bodies up to 64 KB)


mode? ​

optional mode?: "same-origin" | "cors" | "no-cors"

Defined in: api/rust-fetch.d.ts:72

cors (default), same-origin, or no-cors, which resolves with an opaque response (status: 0, no headers, no body)


priority? ​

optional priority?: "high" | "low" | "auto"

Defined in: api/rust-fetch.d.ts:78

Fetch priority, where the browser supports it


referrer? ​

optional referrer?: string

Defined in: api/rust-fetch.d.ts:80

A same-origin URL, '' for none, or about:client (default)


referrerPolicy? ​

optional referrerPolicy?: "" | "origin" | "same-origin" | "no-referrer" | "no-referrer-when-downgrade" | "strict-origin" | "origin-when-cross-origin" | "strict-origin-when-cross-origin" | "unsafe-url"

Defined in: api/rust-fetch.d.ts:81

Released under the MIT or Apache-2.0 license.