WebView.NavigateWithHttpRequestMessage method

Applies to Windows and Windows Phone

Navigates the WebView to a URI with a POST request and HTTP headers.

Syntax

Public Sub NavigateWithHttpRequestMessage(
  requestMessage As HttpRequestMessage 
)

Parameters

requestMessage

Type: HttpRequestMessage

The details of the HTTP request.

Remarks

This method supports only HttpMethod.Post and HttpMethod.Get for the HttpRequestMessage.Method property value.

Examples

This example shows how to create an HTTP request and use it with this method.


HttpRequestMessage httpRequestMessage = new HttpRequestMessage(
    HttpMethod.Post, new Uri("http://www.contoso.com"));
httpRequestMessage.Content = new HttpStringContent("hello, world");
httpRequestMessage.Headers.Append("X-My-Client","true");

myWebView.NavigateWithHttpRequestMessage(httpRequestMessage);


Requirements

Minimum supported client

Windows 8.1

Minimum supported server

Windows Server 2012 R2

Minimum supported phone

Windows Phone 8.1 [Windows Runtime apps only]

Namespace

Windows.UI.Xaml.Controls
Windows::UI::Xaml::Controls [C++]

Metadata

Windows.winmd

See also

WebView

 

 

Show:
© 2014 Microsoft