Early Preview
This is currently very much a preview. Please feel free to try things out,
but don't be upset if anything is not yet working. Feedback is welcome over on our
GitHub Dicussions page.
class System.​Net.​Http.​HttpMethod
Assembly: System.Net.Http
Inheritance: object → HttpMethod
Implemented Interfaces
A helper class for retrieving and comparing standard HTTP methods and for creating new HTTP methods.
Properties
public static
HttpMethod
Connect
Gets the HTTP CONNECT protocol method.
public static
HttpMethod
Delete
Represents an HTTP DELETE protocol method.
public static
HttpMethod
Get
Represents an HTTP GET protocol method.
public static
HttpMethod
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.
public
string
Method
An HTTP method.
public static
HttpMethod
Options
Represents an HTTP OPTIONS protocol method.
public static
HttpMethod
Patch
Gets the HTTP PATCH protocol method.
public static
HttpMethod
Post
Represents an HTTP POST protocol method that is used to post a new entity as an addition to a URI.
public static
HttpMethod
Put
Represents an HTTP PUT protocol method that is used to replace an entity identified by a URI.
public static
HttpMethod
Query
Gets the HTTP QUERY protocol method.
public static
HttpMethod
Trace
Represents an HTTP TRACE protocol method.
Methods
public
bool
Equals​(HttpMethod other)
Determines whether the specified <see cref="T:System.Net.Http.HttpMethod" /> is equal to the current <see cref="T:System.Object" /> .
Returns <see langword="true" /> if the specified object is equal to the current object; otherwise, <see langword="false" /> .
other
The HTTP method to compare with the current object.
public
bool
Equals​(object obj)
Determines whether the specified <see cref="T:System.Object" /> is equal to the current <see cref="T:System.Object" /> .
Returns <see langword="true" /> if the specified object is equal to the current object; otherwise, <see langword="false" /> .
obj
The object to compare with the current object.
public
int
GetHashCode​()
Serves as a hash function for this type.
Returns A hash code for the current <see cref="T:System.Object" /> .
public static
HttpMethod
Parse​(ReadOnlySpan<​char> method)
Parses the provided <paramref name="method" /> into an <see cref="T:System.Net.Http.HttpMethod" /> instance.
Returns An <see cref="T:System.Net.Http.HttpMethod" /> instance for the provided <paramref name="method" /> .
method
The method to parse.
public
string
ToString​()
Returns a string that represents the current object.
Returns A string representing the current object.
protected
void
Finalize​()
Inherited from object
protected
object
MemberwiseClone​()
Inherited from object