Class HttpStatusDescription
Provides standard HTTP status descriptions.
Data contained in this class comes from the following sources:
- RFC7231 Section 6 (HTTP/1.1 Semantics and Content)
- RFC6585 (Additional HTTP Status Codes)
- RFC2774 Section 7 (An HTTP Extension Framework)
- RFC7540 Section 9.1.2 (HTTP/2)
- RFC4918 Section 11 (WebDAV)
- RFC5842 Section 7 (Binding Extensions to WebDAV)
- RFC7538 Section 3 (HTTP Status Code 308)
- RFC3229 Section 10.4.1 (Delta encoding in HTTP)
- RFC8297 Section 2 (Early Hints)
- RFC7725 Section 3 (HTTP-status-451)
- RFC2295 Section 8.1 (Transparent Content Negotiation)
Inherited Members
Namespace: EmbedIO
Syntax
public static class HttpStatusDescription
Methods
Get(HttpStatusCode)
Returns the standard status description for a
Declaration
public static string Get(HttpStatusCode code)
Parameters
Type | Name | Description |
---|---|---|
HttpStatusCode | code | The HTTP status code for which the standard description is to be retrieved. |
Returns
Type | Description |
---|---|
String | The standard HTTP status description for the specified |
Get(Int32)
Returns the standard status description for a HTTP status code specified as an langword_csharp_int.
Declaration
public static string Get(int code)
Parameters
Type | Name | Description |
---|---|---|
Int32 | code | The HTTP status code for which the standard description is to be retrieved. |
Returns
Type | Description |
---|---|
String | The standard HTTP status description for the specified |
TryGet(HttpStatusCode, out String)
Attempts to get the standard status description for a
Declaration
public static bool TryGet(HttpStatusCode code, out string description)
Parameters
Type | Name | Description |
---|---|---|
HttpStatusCode | code | The HTTP status code for which the standard description is to be retrieved. |
String | description | When this method returns, the standard HTTP status description
for the specified |
Returns
Type | Description |
---|---|
Boolean | true if the specified |
See Also
TryGet(Int32, out String)
Attempts to get the standard status description for a HTTP status code specified as an langword_csharp_int.
Declaration
public static bool TryGet(int code, out string description)
Parameters
Type | Name | Description |
---|---|---|
Int32 | code | The HTTP status code for which the standard description is to be retrieved. |
String | description | When this method returns, the standard HTTP status description
for the specified |
Returns
Type | Description |
---|---|
Boolean | true if the specified |