当请求遇到错误时引发的事件。
| Name | Type | Description |
|---|---|---|
statusCode |
number | optional HTTP 错误状态码,例如 404。 |
response |
object | optional 随错误一起包含的响应。 |
responseHeaders |
string | object | optional 响应头,表示为对象字面量或 XMLHttpRequest 的 getAllResponseHeaders() 函数所返回格式的字符串。 |
Members
随错误一起包含的响应。如果错误不包含响应,
此属性将为 undefined。
响应中包含的头,表示为键值对的对象字面量。
如果错误不包含任何头,此属性将为 undefined。
HTTP 错误状态码,例如 404。如果错误没有特定的
HTTP 代码,此属性将为 undefined。
Methods
创建表示此 RequestErrorEvent 的字符串。
Returns:
表示所提供的 RequestErrorEvent 的字符串。
