HttpMethod HttpMethod HttpMethod HttpMethod Class

Definition

A helper class for retrieving and comparing standard HTTP methods and for creating new HTTP methods.

public ref class HttpMethod : IEquatable<System::Net::Http::HttpMethod ^>
public class HttpMethod : IEquatable<System.Net.Http.HttpMethod>
type HttpMethod = class
    interface IEquatable<HttpMethod>
Public Class HttpMethod
Implements IEquatable(Of HttpMethod)
Inheritance
HttpMethodHttpMethodHttpMethodHttpMethod
Implements

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) HttpMethod(String) HttpMethod(String) HttpMethod(String)

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

Properties

Delete Delete Delete Delete

Represents an HTTP DELETE protocol method.

Get Get Get Get

Represents an HTTP GET protocol method.

Head Head Head Head

Represents an HTTP HEAD protocol method. The HEAD method is identical to GET except that the server only returns message-headers in the response, without a message-body.

Method Method Method Method

An HTTP method.

Options Options Options Options

Represents an HTTP OPTIONS protocol method.

Patch Patch Patch Patch
Post Post Post Post

Represents an HTTP POST protocol method that is used to post a new entity as an addition to a URI.

Put Put Put Put

Represents an HTTP PUT protocol method that is used to replace an entity identified by a URI.

Trace Trace Trace Trace

Represents an HTTP TRACE protocol method.

Methods

Equals(HttpMethod) Equals(HttpMethod) Equals(HttpMethod) Equals(HttpMethod)

Determines whether the specified HttpMethod is equal to the current Object.

Equals(Object) Equals(Object) Equals(Object) Equals(Object)

Determines whether the specified Object is equal to the current Object.

GetHashCode() GetHashCode() GetHashCode() GetHashCode()

Serves as a hash function for this type.

GetType() GetType() GetType() GetType()

Gets the Type of the current instance.

(Inherited from Object)
MemberwiseClone() MemberwiseClone() MemberwiseClone() MemberwiseClone()

Creates a shallow copy of the current Object.

(Inherited from Object)
ToString() ToString() ToString() ToString()

Returns a string that represents the current object.

Operators

Equality(HttpMethod, HttpMethod) Equality(HttpMethod, HttpMethod) Equality(HttpMethod, HttpMethod) Equality(HttpMethod, HttpMethod)

The equality operator for comparing two HttpMethod objects.

Inequality(HttpMethod, HttpMethod) Inequality(HttpMethod, HttpMethod) Inequality(HttpMethod, HttpMethod) Inequality(HttpMethod, HttpMethod)

The inequality operator for comparing two HttpMethod objects.

Applies to