Skip to main content

Interface: FetchOptions

Defined in: packages/core/src/data/strategies/AbstractFetchStrategy.ts:71

The options supported by the default fetcher method

Properties

alternativePreviewAuthorizationHeader?

optional alternativePreviewAuthorizationHeader: boolean

Defined in: packages/core/src/data/strategies/AbstractFetchStrategy.ts:94

Flag to enable using the alternative authorization header.

This can be useful if you have separate authentication on your project.


bearerToken?

optional bearerToken: string

Defined in: packages/core/src/data/strategies/AbstractFetchStrategy.ts:80

The authentication token to use for the request.


burstCache?

optional burstCache: boolean

Defined in: packages/core/src/data/strategies/AbstractFetchStrategy.ts:99

Whether to burst cache by appending a timestamp to the query


cache?

optional cache: "no-store" | "force-cache"

Defined in: packages/core/src/data/strategies/AbstractFetchStrategy.ts:104

Cache option


headers?

optional headers: Record<string, unknown>

Defined in: packages/core/src/data/strategies/AbstractFetchStrategy.ts:109

Headers to sent to fetch


next?

optional next: NextJSFetchOptions

Defined in: packages/core/src/data/strategies/AbstractFetchStrategy.ts:111


previewToken?

optional previewToken: string

Defined in: packages/core/src/data/strategies/AbstractFetchStrategy.ts:87

The preview token to use for the request.

These are tokens issued by the HeadstartWP plugin and is used to authenticate previews


throwIfNotFound

throwIfNotFound: boolean

Defined in: packages/core/src/data/strategies/AbstractFetchStrategy.ts:75

Whether to thrown an exception if data is not found.