A response to an HTTP request.
up.request('/foo').then(function(response) {
console.log(response.status) // 200
console.log(response.text) // "<html><body>..."
})
The number of milliseconds since this response was received.
The response's content-type.
Changes to the current context as set by the server.
The response's ETag.
Returns whether this cached response has expired.
Returns the HTTP header value with the given name.
Returns the HTTP header value with the given name.
Returns whether the response was not successful.
Returns whether the server responded with a 2xx HTTP status.
The response body parsed as a JSON string.
The last modification time of the response's underlying content.
The HTTP method used for the request that produced this response.
Returns whether the server responded with a 2xx HTTP status.
The response's
HTTP status code
as a number
.
A render target pushed by the server.
The response body as a string
.
A document title pushed by the server.
The URL from which the response was loaded.
The XMLHttpRequest
object that was used to create this response.