Class
HttpMethod
class HttpMethod
Module: System.Web.Http
Assembly: System.Web.dll
Source file: HttpMethod.rvn
Inheritance: Object → HttpMethod
Implements: EquatableTo<HttpMethod>
An immutable HTTP method token. Construction preserves spelling, including custom methods. Equality and hashing are ordinal-ignore-case, matching .NET HttpMethod.
Constructors
1 item
HttpMethod(method: string)
Creates a method from a nonempty ASCII HTTP token; invalid values fault.
Properties
11 items
Static member:
Connect: HttpMethod
The CONNECT method. A method value alone does not enable tunnelling.
Static member:
Delete: HttpMethod
The DELETE method.
Static member:
Get: HttpMethod
The GET method.
Static member:
Head: HttpMethod
The HEAD method.
Method: string
The validated method spelling, as supplied to the constructor.
Static member:
Options: HttpMethod
The OPTIONS method.
Static member:
Patch: HttpMethod
The PATCH method.
Static member:
Post: HttpMethod
The POST method.
Static member:
Put: HttpMethod
The PUT method.
Static member:
Query: HttpMethod
The QUERY method.
Static member:
Trace: HttpMethod
The TRACE method.
Methods
6 items
Equals(other: HttpMethod) -> bool
Compares method names using ordinal-ignore-case equality.
Implements EquatableTo<HttpMethod>.Equals
Equals(other: object?) -> bool
Compares a method value; null and other object types are unequal.
Overrides Object.Equals
GetHashCode() -> int
Returns a hash consistent with case-insensitive method equality.
Overrides Object.GetHashCode
GetType() -> TypeInfo
Returns metadata for the concrete runtime type of this instance.
Inherited from Object.GetType
Static member:
Parse(method: string) -> Result<HttpMethod, HttpError>
Parses a method token. Known names are canonicalized case-insensitively; custom spelling is retained. Invalid tokens return HttpError.InvalidRequest.
ToString() -> string
Returns the method token for the wire.
Overrides Object.ToString