温馨提示:本站仅提供公开网络链接索引服务,不存储、不篡改任何第三方内容,所有内容版权归原作者所有
AI智能索引来源:http://www.bun.com/reference/globals/Request
点击访问原文链接

class Request | globals module | Bun

class Request | globals module | BunBuildDocsReferenceGuidesBlogDiscord/Globals/RequestMarrayBufferMblobPbodyPbodyUsedMbytesPcacheMclonePcredentialsPdestinationMformDataPheadersPintegrityMjsonPkeepalivePmethodPmodePredirectPreferrerPreferrerPolicyPsignalMtextPurl

Search the reference...

/

BuildDocsReferenceGuidesBlogDiscord/Globals/RequestMarrayBufferMblobPbodyPbodyUsedMbytesPcacheMclonePcredentialsPdestinationMformDataPheadersPintegrityMjsonPkeepalivePmethodPmodePredirectPreferrerPreferrerPolicyPsignalMtextPurl

class

Requestclass Request

This Fetch API interface represents a resource request.

MDN Reference

readonly body: null | ReadableStreamUint8ArrayArrayBufferLike>>readonly bodyUsed: booleanreadonly cache: RequestCache

Returns the cache mode associated with request, which is a string indicating how the request will interact with the browser's cache when fetching.

MDN Reference

readonly credentials: RequestCredentials

Returns the credentials mode associated with request, which is a string indicating whether credentials will be sent with the request always, never, or only when sent to a same-origin URL.

MDN Reference

readonly destination: RequestDestination

Returns the kind of resource requested by request, e.g., "document" or "script".

MDN Reference

readonly headers: Headers

Returns a Headers object consisting of the headers associated with request. Note that headers added in the network layer by the user agent will not be accounted for in this object, e.g., the "Host" header.

MDN Reference

readonly integrity: string

Returns request's subresource integrity metadata, which is a cryptographic hash of the resource being fetched. Its value consists of multiple hashes separated by whitespace. [SRI]

MDN Reference

readonly keepalive: boolean

Returns a boolean indicating whether or not request can outlive the global in which it was created.

MDN Reference

readonly method: string

Returns request's HTTP method, which is "GET" by default.

MDN Reference

readonly mode: RequestMode

Returns the mode associated with request, which is a string indicating whether the request will use CORS, or will be restricted to same-origin URLs.

MDN Reference

readonly redirect: RequestRedirect

Returns the redirect mode associated with request, which is a string indicating how redirects for the request will be handled during fetching. A request will follow redirects by default.

MDN Reference

readonly referrer: string

Returns the referrer of request. Its value can be a same-origin URL if explicitly set in init, the empty string to indicate no referrer, and "about:client" when defaulting to the global's default. This is used during fetching to determine the value of the Referer header of the request being made.

MDN Reference

readonly referrerPolicy: ReferrerPolicy

Returns the referrer policy associated with request. This is used during fetching to compute the value of the request's referrer.

MDN Reference

readonly signal: AbortSignal

Returns the signal associated with request, which is an AbortSignal object indicating whether or not request has been aborted, and its abort event handler.

MDN Reference

readonly url: stringarrayBuffer(): PromiseArrayBuffer>;blob(): PromiseBlob>;bytes(): PromiseUint8ArrayArrayBufferLike>>;clone(): Request;formData(): PromiseFormData>;json(): Promiseany>;text(): Promisestring>;

Resources

ReferenceDocsGuidesDiscordMerch StoreGitHubBlog 

Toolkit

RuntimePackage managerTest runnerBundlerPackage runner

Project

Bun 1.0Bun 1.1Bun 1.2Bun 1.3RoadmapContributingLicense

Baked with ❤️ in San Francisco

We're hiring →

class Request | globals module | Bun,AI智能索引,全网链接索引,智能导航,网页索引

    This Fetch API interface represents a resource request. [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request)