Class HttpMethod
A helper class for retrieving and comparing standard HTTP methods and for creating new HTTP methods.
public class HttpMethod
- Inheritance
-
HttpMethod
- Inherited Members
- Extension Methods
Remarks
The most common usage of HttpMethod is to use one of the static properties 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 specifies.
Constructors
HttpMethod(string)
Initializes a new instance of the HttpMethod class with a specific HTTP method.
public HttpMethod(string method)
Parameters
method
stringThe 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 the app specifies.
Exceptions
Properties
Delete
Represents an HTTP DELETE protocol method.
public static HttpMethod Delete { get; }
Property Value
Get
Represents an HTTP GET protocol method.
public static HttpMethod Get { get; }
Property Value
Head
Represents an HTTP HEAD protocol method.
public static HttpMethod Head { get; }
Property Value
Method
An HTTP method.
public string Method { get; }
Property Value
Options
Represents an HTTP OPTIONS protocol method.
public static HttpMethod Options { get; }
Property Value
Patch
Represents an HTTP PATCH protocol method.
public static HttpMethod Patch { get; }
Property Value
Post
Represents an HTTP POST protocol method.
public static HttpMethod Post { get; }
Property Value
Put
Represents an HTTP PUT protocol method.
public static HttpMethod Put { get; }