Struct HttpStatusInformation
Represents a structure that holds an HTTP response status information, with it's status code and description.
public readonly struct HttpStatusInformation : IEquatable<HttpStatusInformation>, IEquatable<HttpStatusCode>, IEquatable<int>
- Implements
- Inherited Members
Constructors
- HttpStatusInformation()
Creates an new HttpStatusInformation with default parameters (200 OK) status.
- HttpStatusInformation(int)
Creates an new HttpStatusInformation instance with given parameters.
- HttpStatusInformation(int, string)
Creates an new HttpStatusInformation instance with given parameters.
- HttpStatusInformation(HttpStatusCode)
Creates an new HttpStatusInformation instance with given parameters.
Properties
- Description
Gets or sets the short description of the HTTP message.
- StatusCode
Gets or sets the numeric HTTP status code of the HTTP message.
Methods
- GetHttpStatusCode()
Gets an HttpStatusCode corresponding to this instance, or null if the HTTP status does not match any value.
- GetStatusCodeDescription(int)
Gets the description of the HTTP status based on its description.
- GetStatusCodeDescription(HttpStatusCode)
Gets the description of the HTTP status based on its description.
- ToString()
Gets an string representation of this HTTP Status Code.