An event that is raised when a request encounters an error.
参数名称 | 类型 | 描述信息 |
---|---|---|
statusCode |
number | 可选 The HTTP error status code, such as 404. |
response |
object | 可选 The response included along with the error. |
responseHeaders |
string | object | 可选 The response headers, represented either as an object literal or as a string in the format returned by XMLHttpRequest's getAllResponseHeaders() function. |
成员(属性)
The response included along with the error. If the error does not include a response,
this property will be undefined.
The headers included in the response, represented as an object literal of key/value pairs.
If the error does not include any headers, this property will be undefined.
The HTTP error status code, such as 404. If the error does not have a particular
HTTP code, this property will be undefined.
方法
Creates a string representing this RequestErrorEvent.
返回值:
A string representing the provided RequestErrorEvent.