Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 58056

WebView control Request Headers

$
0
0

Is there anyway to set the request headers in the WebView control? Much like the code below which is from a Windows Store application?

        var vm = (BrowserViewModel) this.ViewModel;
        Windows.Web.Http.HttpRequestMessage httpRequestMessage = new Windows.Web.Http.HttpRequestMessage(Windows.Web.Http.HttpMethod.Get, new Uri(vm.WebViewUrl));
        httpRequestMessage.Headers.Add("Authorization", "Basic " + CryptographicBuffer.EncodeToBase64String(CryptographicBuffer.ConvertStringToBinary("user:password", BinaryStringEncoding.Utf8)));
        WebView1.NavigateWithHttpRequestMessage(httpRequestMessage);

Viewing all articles
Browse latest Browse all 58056

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>