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 Microsoft.​AspNetCore.​Http.​HttpProtocol
Assembly: Microsoft.AspNetCore.Http.Abstractions
Inheritance: object → HttpProtocol
Contains methods to verify the request protocol version of an HTTP request.
Fields and Constants
public static readonly
string
Http09
HTTP protocol version 0.9.
public static readonly
string
Http10
HTTP protocol version 1.0.
public static readonly
string
Http11
HTTP protocol version 1.1.
public static readonly
string
Http2
HTTP protocol version 2.
public static readonly
string
Http3
HTTP protcol version 3.
Methods
public static
bool
IsHttp09​(string protocol)
Returns a value that indicates if the HTTP request protocol is HTTP/0.9.
Returns <see langword="true" /> if the protocol is HTTP/0.9; otherwise, <see langword="false" /> .
protocol
The HTTP request protocol.
public static
bool
IsHttp10​(string protocol)
Returns a value that indicates if the HTTP request protocol is HTTP/1.0.
Returns <see langword="true" /> if the protocol is HTTP/1.0; otherwise, <see langword="false" /> .
protocol
The HTTP request protocol.
public static
bool
IsHttp11​(string protocol)
Returns a value that indicates if the HTTP request protocol is HTTP/1.1.
Returns <see langword="true" /> if the protocol is HTTP/1.1; otherwise, <see langword="false" /> .
protocol
The HTTP request protocol.
public static
bool
IsHttp2​(string protocol)
Returns a value that indicates if the HTTP request protocol is HTTP/2.
Returns <see langword="true" /> if the protocol is HTTP/2; otherwise, <see langword="false" /> .
protocol
The HTTP request protocol.
public static
bool
IsHttp3​(string protocol)
Returns a value that indicates if the HTTP request protocol is HTTP/3.
Returns <see langword="true" /> if the protocol is HTTP/3; otherwise, <see langword="false" /> .
protocol
The HTTP request protocol.
public static
string
GetHttpProtocol​(System.​Version version)
Gets the HTTP request protocol for the specified <see cref="T:System.Version" /> .
Returns A HTTP request protocol.
version
The version.
public
bool
Equals​(object obj)
Inherited from object
protected
void
Finalize​()
Inherited from object
public
int
GetHashCode​()
Inherited from object
protected
object
MemberwiseClone​()
Inherited from object
public
string
ToString​()
Inherited from object