There is a way to interact with the network latyer even when using WKWebView. Since iOS9 there are the Network Extension APIs which allow you to access (and modify/filter) raw packet data.
For example: https://developer.apple.com/reference/networkextension/neapp...