Hi all,
Is it possible to set cookies for the new WebViewBrowser control?
Up until now I've been using the ChromiumWebBrowser control and I was able to get the cookie manager by means of either
Cef.GetGlobalCookieManager()
or
ChromiumWebBrowser.GetCookieManager()
However, as ChromiumWebBrowser has been deprecated, I have just switched to using the WebViewBrowser control instead and I cannot find a way to set the cookies or access the cookie manager. Is there any way to achieve this?
From what I have gathered, WebView2 allows to achieve this via its property CoreWebView2. The cookie manager can be accessed directly via the property CookieManager.
WebView2.CoreWebView2.CookieManager
Another option is to capture the event WebResourceRequested and attach a header to the CoreWebView2WebResourceRequest provided by CoreWebView2WebResourceRequestedEventArgs.
CoreWebView2WebResourceRequestedEventArgs.Request.Headers.SetHeader()
If it was currently not possible to set the cookies for the WebViewBrowser control, would the ArcGIS Pro SDK 3.0 expose either CoreWebView2 or CookieManager, or perhaps the event WebResourceRequested?
I'm using ArcGIS Pro SDK 2.9.0.32739.
Thanks