uwp WebView navigation Navigate with HttpRequestMessage


Example

Set custom user agent and navigate to Uri:

var userAgent = "my custom user agent";
var uri = new Uri("http://useragentstring.com/");
var requestMessage = new HttpRequestMessage(HttpMethod.Get, uri);
requestMessage.Headers.Add("User-Agent", userAgent);

this.webView.NavigateWithHttpRequestMessage(requestMessage);