当请求遇到错误时引发的事件。 An event that is raised when a request encounters an error.
| 名称 Name | 类型 Type | 说明 Description |
|---|---|---|
statusCode |
number | 可选 optional HTTP 错误状态代码,例如 404。 The HTTP error status code, such as 404. |
response |
object | 可选 optional 响应与错误一起包含在内。 The response included along with the error. |
responseHeaders |
string | object | 可选 optional 响应标头,表示为对象文字或 XMLHttpRequest 的 getAllResponseHeaders() 函数返回的格式的字符串。 The response headers, represented either as an object literal or as a string in the format returned by XMLHttpRequest's getAllResponseHeaders() function. |
成员 Members
响应与错误一起包含在内。如果错误不包含响应,则该属性将是未定义的。 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.
HTTP 错误状态代码,例如 404。如果错误没有特定的 HTTP 代码,则该属性将是未定义的。 The HTTP error status code, such as 404. If the error does not have a particular HTTP code, this property will be undefined.
方法 Methods
创建一个表示此 RequestErrorEvent 的字符串。 Creates a string representing this RequestErrorEvent.
返回: Returns:
表示所提供的 RequestErrorEvent 的字符串。 A string representing the provided RequestErrorEvent.
