Method Property
Collapse the table of content
Expand the table of content

HttpRequestMessageProperty.Method Property

[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]

Gets or sets the HTTP verb for the HTTP request.

Namespace:  System.ServiceModel.Channels
Assembly:  System.ServiceModel (in System.ServiceModel.dll)

public string Method { get; set; }

Property Value

Type: System.String
The HTTP verb for the HTTP request.

ExceptionCondition
ArgumentNullException

value set is null.

By default, Windows Phone uses the POST verb for HTTP messages. The GET verb is used by Windows Phone to display help information when accessing a ServiceHost's base address. This is useful for checking whether a WCF service is active when using a Web browser. Other methods defined by the HTTP RFC are PUT, DELETE, HEAD, OPTIONS, TRACE, and CONNECT. These methods have special behaviors when interoperating with other services.

Windows Phone OS

Supported in: 8.1, 8.0, 7.1, 7.0

Windows Phone

Show:
© 2017 Microsoft