Readonly
bodyThe response's body.
Readonly
closedWhether the response is closed.
- Response is closed by InterceptableResponse.respondWith.
Readonly
headersThe response's HTTP headers.
Readonly
requestThe response's request.
Readonly
statusThe response's status code.
Readonly
statusThe response's status text.
Readonly
urlThe response's url.
- This can differ from the request.url
when redirected.
Replaces the original response with the provided response.
A ResponseLike.
- Invocation closes the response.
- Invocation while the response is closed will throw an error.
Wait until the given callback is done before closing this response.
- The first argument of the callback is a done
function, which must be called to resolve the callback.
- Invocation of the done
function closes the response.
- Invocation while the response is closed will throw an error.
Wait until the given promise is resolved before closing this response.
- Resolution of the promise closes the response.
- Invocation while the response is closed will throw an error.
- This is equivalent to:
response.waitUntil(function (done) {
promise.then(function () {
done();
}).catch(function (error) {
done(error);
});
})
Represents an intercepted HTTP response which can be modified.