Skip to content
Response

Gameplay / Response

Response Interface ​

Object of HTTP response information

Table of contents ​

Properties ​

headers: Map<string, string>
Response Head
ok: boolean
Whether successful (whether the status code is 200)
status: number
Response status code
type: string
Response type
url: string
Response URL

Methods ​

json<T: >(): Promise<T: > other
Data return JSON
text(): Promise<string> <Badge type="tip" text="other" />
Data return text

Properties ​

headers ​

• headers: Map<string, string>

Response Head


ok ​

• ok: boolean

Whether successful (whether the status code is 200)


status ​

• status: number

Response status code


type ​

• type: string

Response type


url ​

• url: string

Response URL

Methods ​

json ​

• json<T>(): Promise<T> other

Data return JSON

Returns ​

Promise<T>Data return JSON

Type parameters ​

Name
T

text ​

• text(): Promise<string> other

Data return text

Returns ​

Promise<string>Data return text