FetchResponse
The response to PluginContext.fetch. Its body reads once, as text, JSON or bytes, in the code that awaits the response; it isn’t kept for later.
Properties
Section titled “Properties”headers
Section titled “headers”
readonlyheaders:object
entries()
Section titled “entries()”entries(): [
string,string][]
Lowercase names and values.
Returns
Section titled “Returns”[string, string][]
get(
name):string|null
A header’s value, its repeats joined with commas, or null; names ignore case.
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”string | null
has(
name):boolean
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”boolean
readonlyok:boolean
Whether the status is from 200 to 299.
status
Section titled “status”
readonlystatus:number
Methods
Section titled “Methods”bytes()
Section titled “bytes()”bytes():
Uint8Array
Returns
Section titled “Returns”Uint8Array
json()
Section titled “json()”json():
unknown
Returns
Section titled “Returns”unknown
text()
Section titled “text()”text():
string
Returns
Section titled “Returns”string