Version: 2.69.0

InterceptableResponse

THEOplayer > InterceptableResponse

InterceptableResponse interface

Represents an intercepted HTTP response which can be modified.

Signature:
export interface InterceptableResponse

Properties

PropertyTypeDescription
bodyResponseBodyThe response's body.
closedbooleanWhether the response is closed.
headersHTTPHeadersThe response's HTTP headers.
requestRequestThe response's request.
statusnumberThe response's status code.
statusTextstringThe response's status text.
urlstringThe response's url.

Methods

MethodDescription
respondWith(response)Replaces the original response with the provided response.
waitUntil(fn)Wait until the given callback is done before closing this response.
waitUntil(promise)Wait until the given promise is resolved before closing this response.