You can do this in the navigation delegate method decidePolicy :
optional func webView(
_ webView: WKWebView,
decidePolicyFor navigationAction: WKNavigationAction,
decisionHandler: @escaping (WKNavigationActionPolicy) -> Void
)
the navigationAction parameter contains the URLRequest which contains the httpBody of the POST request.
Topic:
Programming Languages
SubTopic:
Swift
Tags: