Skip to main content
Version: Version 5

Interface: HttpOptions

Options that are applied to a HTTP request.

Properties

cache?

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

Indicating how the request will interact with the browser's HTTP cache.


credentials?

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

Controls what browsers do with credentials (i.e. cookies, HTTP authentication entries, and TLS client certificates).


headers?

optional headers: object

Index Signature

[key: string]: string


mode?

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

The mode for the request


redirect?

optional redirect: "error" | "follow" | "manual"

Specify how to handle redirects in the response.


referrerPolicy?

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

Specifies the referrer policy to use for the request.