Responselink
Creates Response
instances from provided values.
弃用说明
说明
Though this object isn't usually instantiated by end-users, it is the primary object interacted with when it comes time to add data to a view.
Example
The Response's interface is inspired by the Response constructor defined in the Fetch Spec, but is considered a static value whose body can be accessed many times. There are other differences in the implementation, but this is the most significant.
构造函数
参数
|
属性
属性名 | 类型 | 说明 |
---|---|---|
type | One of "basic", "cors", "default", "error", or "opaque". Defaults to "default". | |
ok | True if the response's status is within 200-299 | |
url | URL of response. Defaults to empty string. | |
status | Status code returned by server. Defaults to 200. | |
statusText | Text representing the corresponding reason phrase to the Defaults to "OK" | |
bytesLoaded | Non-standard property Denotes how many of the response body's bytes have been loaded, for example if the response is the result of a progress event. | |
totalBytes | Non-standard property Denotes how many bytes are expected in the final response body. | |
headers | Headers object based on the |
方法
参数没有参数。 返回值
|