Interface RouteRequestOptions<RT, ReturnUrl, Q, B>

interface RouteRequestOptions<RT, ReturnUrl, Q, B> {
    body?: string;
    cache?: boolean;
    cacheName?: string;
    cacheProps?: Record<string, unknown>;
    credentials?: RequestCredentials;
    headers?: Record<string, string>;
    integrity?: string;
    json?: B;
    keepalive?: boolean;
    lunkwill?: LunkwillParam;
    lunkwillReturnUrl?: ReturnUrl;
    method?: string;
    mode?: RequestMode;
    priority?: RequestPriority;
    query?: Q;
    redirect?: RequestRedirect;
    referrer?: string;
    referrerPolicy?: ReferrerPolicy;
    responseType?: RT;
    signal?: null | AbortSignal;
    window?: null;
    withCredentials?: boolean;
}

Type Parameters

  • RT extends ResponseType = "json"
  • ReturnUrl extends boolean = false
  • Q = any
  • B =
        | string
        | null
        | boolean
        | Record<string, any>
        | any[]

Hierarchy

  • Omit<RequestInit, "cache">
    • RouteRequestOptions

Properties

body?: string

Has lower priority than the json

cache?: boolean
cacheName?: string

Name to use for caching the request.

cacheProps?: Record<string, unknown>

Properties to override default cache behavior.

credentials?: RequestCredentials

A string indicating whether credentials will be sent with the request always, never, or only when sent to a same-origin URL. Sets request's credentials.

headers?: Record<string, string>

A Headers object, an object literal, or an array of two-item arrays to set request's headers.

integrity?: string

A cryptographic hash of the resource to be fetched by request. Sets request's integrity.

json?: B
keepalive?: boolean

A boolean to set request's keepalive.

lunkwill?: LunkwillParam
lunkwillReturnUrl?: ReturnUrl
method?: string

A string to set request's method.

mode?: RequestMode

A string to indicate whether the request will use CORS, or will be restricted to same-origin URLs. Sets request's mode.

priority?: RequestPriority
query?: Q
redirect?: RequestRedirect

A string indicating whether request follows redirects, results in an error upon encountering a redirect, or returns the redirect (in an opaque fashion). Sets request's redirect.

referrer?: string

A string whose value is a same-origin URL, "about:client", or the empty string, to set request's referrer.

referrerPolicy?: ReferrerPolicy

A referrer policy to set request's referrerPolicy.

responseType?: RT

The type of data that the server will respond with. Can be either 'json' or 'blob'.

signal?: null | AbortSignal

An AbortSignal to set request's signal.

window

Can only be null. Used to disassociate request from any Window.

withCredentials?: boolean

use RequestInit.credential Indicates whether to include credentials such as cookies, authentication headers, or TLS client certificates in cross-site Access-Control requests.