When using the old UIWebView you could catch the requests by implementing a custom NSURLProtocol. I us this to handle requests that requires authentication.
I tried
Try this approach: https://github.com/WildDylan/WKWebViewWithURLProtocol/tree/master/Example/WKWebViewWithURLProtocol
It may be uses private API - i'm not sure ;)