注意: 此页面尚未翻译成中文。以下内容为英文原版。The response for a FetchRequest.
Implements
Iterable<[string,string]>
Accessors
body
null if there was no body.
Returns
null | Readonly<Uint8Array>
Source
utils/fetch.ts:891bodyJson
Returns
any
Source
utils/fetch.ts:916bodyText
"") if there was no body.
An error is thrown if the body is invalid UTF-8 data.
Returns
string
Source
utils/fetch.ts:900headers
Returns
Record<string, string>
Source
utils/fetch.ts:884request
Returns
null | FetchRequest
Source
utils/fetch.ts:1033statusCode
Returns
number
Source
utils/fetch.ts:870statusMessage
Returns
string
Source
utils/fetch.ts:877Methods
assertOk()
SERVER_ERROR if this response is not ok.
Returns
void
Throws
If the response is not ok.Source
utils/fetch.ts:1049getHeader()
key, ignoring case.
Parameters
Returns
string
The header value.
Source
utils/fetch.ts:1016hasBody()
Returns
this is FetchResponse & Object
True if the response has a body.
Throws
If the body is invalid UTF-8 data.Source
utils/fetch.ts:1026makeServerError()
message with an
optional error.
Parameters
Returns
FetchResponse
The error response.
Source
utils/fetch.ts:975ok()
Returns
boolean
Source
utils/fetch.ts:1040throwThrottleError()
stall milliseconds.
Parameters
Returns
never
Throws
Ifstall is not a non-negative integer.
