Better Fetch

All Options

Fetch options is a union of fetch options and additional better fetch options.

All Fetch Options

PropTypeDefault
cache
NonNullable<(ExtraOptions & Omit<RequestInit, "body"> & FetchHooks<Res> & { timeout?: number | undefined; customFetchImpl?: FetchEsque | undefined; ... 15 more ...; disableValidation?: boolean | undefined; })["cache"]>
-
credentials
NonNullable<(ExtraOptions & Omit<RequestInit, "body"> & FetchHooks<Res> & { timeout?: number | undefined; customFetchImpl?: FetchEsque | undefined; ... 15 more ...; disableValidation?: boolean | undefined; })["credentials"]>
-
headers
NonNullable<(ExtraOptions & Omit<RequestInit, "body"> & FetchHooks<Res> & { timeout?: number | undefined; customFetchImpl?: FetchEsque | undefined; ... 15 more ...; disableValidation?: boolean | undefined; })["headers"]>
-
integrity
NonNullable<(ExtraOptions & Omit<RequestInit, "body"> & FetchHooks<Res> & { timeout?: number | undefined; customFetchImpl?: FetchEsque | undefined; ... 15 more ...; disableValidation?: boolean | undefined; })["integrity"]>
-
keepalive
NonNullable<(ExtraOptions & Omit<RequestInit, "body"> & FetchHooks<Res> & { timeout?: number | undefined; customFetchImpl?: FetchEsque | undefined; ... 15 more ...; disableValidation?: boolean | undefined; })["keepalive"]>
-
method
NonNullable<(ExtraOptions & Omit<RequestInit, "body"> & FetchHooks<Res> & { timeout?: number | undefined; customFetchImpl?: FetchEsque | undefined; ... 15 more ...; disableValidation?: boolean | undefined; })["method"]>
-
mode
NonNullable<(ExtraOptions & Omit<RequestInit, "body"> & FetchHooks<Res> & { timeout?: number | undefined; customFetchImpl?: FetchEsque | undefined; ... 15 more ...; disableValidation?: boolean | undefined; })["mode"]>
-
priority
NonNullable<(ExtraOptions & Omit<RequestInit, "body"> & FetchHooks<Res> & { timeout?: number | undefined; customFetchImpl?: FetchEsque | undefined; ... 15 more ...; disableValidation?: boolean | undefined; })["priority"]>
-
redirect
NonNullable<(ExtraOptions & Omit<RequestInit, "body"> & FetchHooks<Res> & { timeout?: number | undefined; customFetchImpl?: FetchEsque | undefined; ... 15 more ...; disableValidation?: boolean | undefined; })["redirect"]>
-
referrer
NonNullable<(ExtraOptions & Omit<RequestInit, "body"> & FetchHooks<Res> & { timeout?: number | undefined; customFetchImpl?: FetchEsque | undefined; ... 15 more ...; disableValidation?: boolean | undefined; })["referrer"]>
-
referrerPolicy
NonNullable<(ExtraOptions & Omit<RequestInit, "body"> & FetchHooks<Res> & { timeout?: number | undefined; customFetchImpl?: FetchEsque | undefined; ... 15 more ...; disableValidation?: boolean | undefined; })["referrerPolicy"]>
-
signal
NonNullable<(ExtraOptions & Omit<RequestInit, "body"> & FetchHooks<Res> & { timeout?: number | undefined; customFetchImpl?: FetchEsque | undefined; ... 15 more ...; disableValidation?: boolean | undefined; })["signal"]>
-
window
NonNullable<(ExtraOptions & Omit<RequestInit, "body"> & FetchHooks<Res> & { timeout?: number | undefined; customFetchImpl?: FetchEsque | undefined; ... 15 more ...; disableValidation?: boolean | undefined; })["window"]>
-
next
NonNullable<(ExtraOptions & Omit<RequestInit, "body"> & FetchHooks<Res> & { timeout?: number | undefined; customFetchImpl?: FetchEsque | undefined; ... 15 more ...; disableValidation?: boolean | undefined; })["next"]>
-
onRequest
NonNullable<(ExtraOptions & Omit<RequestInit, "body"> & FetchHooks<Res> & { timeout?: number | undefined; customFetchImpl?: FetchEsque | undefined; ... 15 more ...; disableValidation?: boolean | undefined; })["onRequest"]>
-
onResponse
NonNullable<(ExtraOptions & Omit<RequestInit, "body"> & FetchHooks<Res> & { timeout?: number | undefined; customFetchImpl?: FetchEsque | undefined; ... 15 more ...; disableValidation?: boolean | undefined; })["onResponse"]>
-
onSuccess
NonNullable<(ExtraOptions & Omit<RequestInit, "body"> & FetchHooks<Res> & { timeout?: number | undefined; customFetchImpl?: FetchEsque | undefined; ... 15 more ...; disableValidation?: boolean | undefined; })["onSuccess"]>
-
onError
NonNullable<(ExtraOptions & Omit<RequestInit, "body"> & FetchHooks<Res> & { timeout?: number | undefined; customFetchImpl?: FetchEsque | undefined; ... 15 more ...; disableValidation?: boolean | undefined; })["onError"]>
-
onRetry
NonNullable<(ExtraOptions & Omit<RequestInit, "body"> & FetchHooks<Res> & { timeout?: number | undefined; customFetchImpl?: FetchEsque | undefined; ... 15 more ...; disableValidation?: boolean | undefined; })["onRetry"]>
-
hookOptions
NonNullable<(ExtraOptions & Omit<RequestInit, "body"> & FetchHooks<Res> & { timeout?: number | undefined; customFetchImpl?: FetchEsque | undefined; ... 15 more ...; disableValidation?: boolean | undefined; })["hookOptions"]>
-
timeout
NonNullable<(ExtraOptions & Omit<RequestInit, "body"> & FetchHooks<Res> & { timeout?: number | undefined; customFetchImpl?: FetchEsque | undefined; ... 15 more ...; disableValidation?: boolean | undefined; })["timeout"]>
-
customFetchImpl
NonNullable<(ExtraOptions & Omit<RequestInit, "body"> & FetchHooks<Res> & { timeout?: number | undefined; customFetchImpl?: FetchEsque | undefined; ... 15 more ...; disableValidation?: boolean | undefined; })["customFetchImpl"]>
-
plugins
NonNullable<(ExtraOptions & Omit<RequestInit, "body"> & FetchHooks<Res> & { timeout?: number | undefined; customFetchImpl?: FetchEsque | undefined; ... 15 more ...; disableValidation?: boolean | undefined; })["plugins"]>
-
baseURL
NonNullable<(ExtraOptions & Omit<RequestInit, "body"> & FetchHooks<Res> & { timeout?: number | undefined; customFetchImpl?: FetchEsque | undefined; ... 15 more ...; disableValidation?: boolean | undefined; })["baseURL"]>
-
throw
NonNullable<(ExtraOptions & Omit<RequestInit, "body"> & FetchHooks<Res> & { timeout?: number | undefined; customFetchImpl?: FetchEsque | undefined; ... 15 more ...; disableValidation?: boolean | undefined; })["throw"]>
false
auth
NonNullable<(ExtraOptions & Omit<RequestInit, "body"> & FetchHooks<Res> & { timeout?: number | undefined; customFetchImpl?: FetchEsque | undefined; ... 15 more ...; disableValidation?: boolean | undefined; })["auth"]>
-
body
NonNullable<(ExtraOptions & Omit<RequestInit, "body"> & FetchHooks<Res> & { timeout?: number | undefined; customFetchImpl?: FetchEsque | undefined; ... 15 more ...; disableValidation?: boolean | undefined; })["body"]>
-
query
NonNullable<(ExtraOptions & Omit<RequestInit, "body"> & FetchHooks<Res> & { timeout?: number | undefined; customFetchImpl?: FetchEsque | undefined; ... 15 more ...; disableValidation?: boolean | undefined; })["query"]>
-
params
NonNullable<(ExtraOptions & Omit<RequestInit, "body"> & FetchHooks<Res> & { timeout?: number | undefined; customFetchImpl?: FetchEsque | undefined; ... 15 more ...; disableValidation?: boolean | undefined; })["params"]>
-
duplex
NonNullable<(ExtraOptions & Omit<RequestInit, "body"> & FetchHooks<Res> & { timeout?: number | undefined; customFetchImpl?: FetchEsque | undefined; ... 15 more ...; disableValidation?: boolean | undefined; })["duplex"]>
-
jsonParser
NonNullable<(ExtraOptions & Omit<RequestInit, "body"> & FetchHooks<Res> & { timeout?: number | undefined; customFetchImpl?: FetchEsque | undefined; ... 15 more ...; disableValidation?: boolean | undefined; })["jsonParser"]>
-
retry
NonNullable<(ExtraOptions & Omit<RequestInit, "body"> & FetchHooks<Res> & { timeout?: number | undefined; customFetchImpl?: FetchEsque | undefined; ... 15 more ...; disableValidation?: boolean | undefined; })["retry"]>
-
retryAttempt
NonNullable<(ExtraOptions & Omit<RequestInit, "body"> & FetchHooks<Res> & { timeout?: number | undefined; customFetchImpl?: FetchEsque | undefined; ... 15 more ...; disableValidation?: boolean | undefined; })["retryAttempt"]>
-
output
NonNullable<(ExtraOptions & Omit<RequestInit, "body"> & FetchHooks<Res> & { timeout?: number | undefined; customFetchImpl?: FetchEsque | undefined; ... 15 more ...; disableValidation?: boolean | undefined; })["output"]>
-
errorSchema
NonNullable<(ExtraOptions & Omit<RequestInit, "body"> & FetchHooks<Res> & { timeout?: number | undefined; customFetchImpl?: FetchEsque | undefined; ... 15 more ...; disableValidation?: boolean | undefined; })["errorSchema"]>
-
disableValidation
NonNullable<(ExtraOptions & Omit<RequestInit, "body"> & FetchHooks<Res> & { timeout?: number | undefined; customFetchImpl?: FetchEsque | undefined; ... 15 more ...; disableValidation?: boolean | undefined; })["disableValidation"]>
false

On this page