onResourceResponse

abstract fun onResourceResponse(browser: CefBrowser, frame: CefFrame, request: CefRequest, response: CefResponse): Boolean

Called on the IO thread when a resource response is received. The |browser| and |frame| values represent the source of the request, and may be null for requests originating from service workers or CefURLRequest. To allow the resource load to proceed without modification return false. To redirect or retry the resource load optionally modify |request| and return true. Modification of the request URL will be treated as a redirect. Requests handled using the default network loader cannot be redirected in this callback.

Return

True if |request| was modified or false otherwise

Parameters

browser

The corresponding browser.

frame

The frame generating the event. Instance only valid within the scope of this method.

request

The request itself. May be modified in this callback. Instance only valid within the scope of this method.

response

The request response. Cannot be modified in this callback. Instance only valid within the scope of this method.