alexrainman / ModernHttpClient

ModernHttpClient
MIT License
126 stars 27 forks source link

Can ModernHttpClient send X509 certificates to safariviewcontroller a webview, and the Android equivalent? #50

Closed AA-65537 closed 4 years ago

AA-65537 commented 4 years ago

I need to use a custom X509 certificate store when accessing a website, where I have different trusted roots, and also have a client certificate.

Can I use ModernHTTPClient to make and secure the connection, and then leverage a browser to display the HTML contents?

alexrainman commented 4 years ago

I think it is possible in Android overriding the WebView client and using modern to load the content:

webView.setWebViewClient(new WebViewClient() {
    @Override
    public boolean shouldOverrideUrlLoading(WebView view, String url) {
        // Insert your code here
    }
});
alexrainman commented 4 years ago

UIWebView delegate has similar method:

-(BOOL)webView:(UIWebView *)webView shouldStartLoadWithRequest:(NSURLRequest *)request navigationType:(UIWebViewNavigationType)navigationType