Unosquare
    Show / Hide Table of Contents

    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)

    Inheritance
    Object
    HttpStatusDescription
    Inherited Members
    Object.ToString()
    Object.Equals(Object)
    Object.Equals(Object, Object)
    Object.ReferenceEquals(Object, Object)
    Object.GetHashCode()
    Object.GetType()
    Object.MemberwiseClone()
    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 code if it was found, or null if it was not found.

    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 code if it was found, or null if it was not found.

    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 code if it was found, or null if it was not found. This parameter is passed uninitialized.

    Returns
    Type Description
    Boolean

    true if the specified code was found in the list of HTTP status codes for which the standard description is known; otherwise, false.

    See Also
    TryGet(Int32, out String)
    Get(HttpStatusCode)

    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 code if it was found, or null if it was not found. This parameter is passed uninitialized.

    Returns
    Type Description
    Boolean

    true if the specified code was found in the list of HTTP status codes for which the standard description is known; otherwise, false.

    See Also
    TryGet(HttpStatusCode, out String)
    Get(Int32)

    Comments

    Back to top Copyright © 2017-2019 Unosquare