EN
Il contenuto non è disponibile nella lingua di destinazione, ma solo in inglese.

WebView.NavigateWithHttpRequestMessage method

Applies to Windows and Windows Phone

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

Syntax


public void NavigateWithHttpRequestMessage(
  HttpRequestMessage requestMessage
)

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.

Warning  If you add additional headers to this request, such as authentication credentials, remember that those headers will also be included with any subsequent child requests. Use caution to prevent accidental disclosure of confidential or personal information.

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

 

 

Mostra:
© 2014 Microsoft