Skip to content
D
Documentation

KyRequest

reference
2 min readUpdated

Import it from ky.

ts
type KyRequest<T = unknown> = {
	clone: () => KyRequest<T>;
	json: <J = T>() => Promise<J>;
} & Request;

Properties

NameTypeDefaultDescription
clone() => KyRequest<T>
json<J = T>() => Promise<J>
cacheRequestCacheThe cache read-only property of the Request interface contains the cache mode of the request.
credentialsRequestCredentialsThe credentials read-only property of the Request interface reflects the value given to the Request.Request() constructor in the credentials option.
destinationRequestDestinationThe destination read-only property of the Request interface returns a string describing the type of content being requested.
headersHeadersThe headers read-only property of the with the request.
integritystringThe integrity read-only property of the Request interface contains the subresource integrity value of the request.
keepalivebooleanThe keepalive read-only property of the Request interface contains the request's keepalive setting (true or false), which indicates whether the browser will keep the associated request alive if the page that initiated it is unloaded before the request is complete.
methodstringThe method read-only property of the POST, etc.) A String indicating the method of the request.
modeRequestModeThe mode read-only property of the Request interface contains the mode of the request (e.g., cors, no-cors, same-origin, or navigate.) This is used to determine if cross-origin requests lead to valid responses, and which properties of the response are readable.
redirectRequestRedirectThe redirect read-only property of the Request interface contains the mode for how redirects are handled.
referrerstringThe referrer read-only property of the Request.
referrerPolicyReferrerPolicyThe referrerPolicy read-only property of the referrer information, sent in the Referer header, should be included with the request.
signalAbortSignalThe read-only signal property of the Request interface returns the AbortSignal associated with the request.
urlstringThe url read-only property of the Request interface contains the URL of the request.
bodyReadableStream<Uint8Array<ArrayBuffer>> | nullMDN Reference
bodyUsedbooleanMDN Reference

Members

Was this page helpful?

KyRequest — ky · GPT-6.1 Sol