HttpMethod HttpMethod HttpMethod HttpMethod Class

Definition

Retrieves standard HTTP methods such as GET and POST and creates new HTTP methods.

public : sealed class HttpMethod : IStringable, IHttpMethod
public sealed class HttpMethod : IStringable, IHttpMethod
Public NotInheritable Class HttpMethod Implements IStringable, IHttpMethod
var httpMethod = new httpMethod(method);
Attributes
Windows 10 requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

Remarks

The most common use of HttpMethod is to get a standard HTTP method (verb) from a property on this class. However, if an app needs a different value for the HTTP method, the HttpMethod constructor initializes a new instance of the HttpMethod with an HTTP method that the app developer specifies.

Constructors

HttpMethod(String) HttpMethod(String) HttpMethod(String) HttpMethod(String)

Initializes a new instance of the HttpMethod class with a specific HTTP method.

public : HttpMethod(Platform::String method)
public HttpMethod(String method)
Public Sub New(method As String)
var httpMethod = new httpMethod(method);
Parameters
method
Platform::String String String String

The HTTP method.

Remarks

If an app needs a different value for the HTTP method from one of the static properties, the HttpMethod constructor initializes a new instance of the HttpMethod with an HTTP method that caller specifies.

Properties

Delete Delete Delete Delete

Gets the HTTP DELETE method.

public : static HttpMethod Delete { get; }
public static HttpMethod Delete { get; }
Public Static ReadOnly Property Delete As HttpMethod
var httpMethod = Windows.Web.Http.HttpMethod.delete;
Value
HttpMethod HttpMethod HttpMethod HttpMethod

The HTTP DELETE method.

Get Get Get Get

Gets the HTTP GET method.

public : static HttpMethod Get { get; }
public static HttpMethod Get { get; }
Public Static ReadOnly Property Get As HttpMethod
var httpMethod = Windows.Web.Http.HttpMethod.get;
Value
HttpMethod HttpMethod HttpMethod HttpMethod

The HTTP GET method.

Head Head Head Head

Gets the HTTP HEAD method.

public : static HttpMethod Head { get; }
public static HttpMethod Head { get; }
Public Static ReadOnly Property Head As HttpMethod
var httpMethod = Windows.Web.Http.HttpMethod.head;
Value
HttpMethod HttpMethod HttpMethod HttpMethod

The HTTP HEAD method.

Method Method Method Method

Gets the HTTP method.

public : Platform::String Method { get; }
public string Method { get; }
Public ReadOnly Property Method As string
var string = httpMethod.method;
Value
Platform::String string string string

An HTTP method represented as a String.

Options Options Options Options

Gets the HTTP OPTIONS method.

public : static HttpMethod Options { get; }
public static HttpMethod Options { get; }
Public Static ReadOnly Property Options As HttpMethod
var httpMethod = Windows.Web.Http.HttpMethod.options;
Value
HttpMethod HttpMethod HttpMethod HttpMethod

The HTTP OPTIONS method.

Patch Patch Patch Patch

Gets the HTTP PATCH method,

public : static HttpMethod Patch { get; }
public static HttpMethod Patch { get; }
Public Static ReadOnly Property Patch As HttpMethod
var httpMethod = Windows.Web.Http.HttpMethod.patch;
Value
HttpMethod HttpMethod HttpMethod HttpMethod

The HTTP PATCH method.

Post Post Post Post

Gets the HTTP POST method.

public : static HttpMethod Post { get; }
public static HttpMethod Post { get; }
Public Static ReadOnly Property Post As HttpMethod
var httpMethod = Windows.Web.Http.HttpMethod.post;
Value
HttpMethod HttpMethod HttpMethod HttpMethod

The HTTP POST method.

Put Put Put Put

Gets the HTTP PUT method.

public : static HttpMethod Put { get; }
public static HttpMethod Put { get; }
Public Static ReadOnly Property Put As HttpMethod
var httpMethod = Windows.Web.Http.HttpMethod.put;
Value
HttpMethod HttpMethod HttpMethod HttpMethod

The HTTP PUT method.

Methods

ToString() ToString() ToString() ToString()

Returns a string that represents the current HttpMethod object.

public : Platform::String ToString()
public string ToString()
Public Function ToString() As string
var string = httpMethod.toString();
Returns
Platform::String string string string

A string that represents the current object.