Hello,
Is there any vision to normalize requests interception through the main, platform-agnostic MAUI library (I'm asking since WebViewClient.ShouldInterceptRequest is from Xamarin SDK)?
No, this is because intercepting HTTP requests depends on the WebView's API on the specific platform.
You could refer to Invoke platform code to get more details about how to access the required platform APIs.
The following documentations would be helpful for you:
- Android shouldInterceptRequest
- iOS WKURLSchemeHandler.
- Since the documentation for iOS is very brief, you can refer to the workarounds of this question: Intercept request with WKWebView.
- Windows Custom management of network requests.
Best Regards,
Alec Liu.
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.