Table of Contents

HttpStatusCodeException Class

Definition

Namespace
Cuemon.AspNetCore.Http
Assemblies
Cuemon.AspNetCore.dll
Source
src/Cuemon.AspNetCore/Http/HttpStatusCodeException.cs

Provides a base-class for exceptions based on an HTTP status code.

public abstract class HttpStatusCodeException : Exception, ISerializable
Inheritance
object
HttpStatusCodeException
Implements
Derived
Inherited Members

Constructors

Name Description
HttpStatusCodeException(int, string, Exception)

Initializes a new instance of the HttpStatusCodeException class.

HttpStatusCodeException(int, string, string, Exception)

Initializes a new instance of the HttpStatusCodeException class.

Properties

Name Description
Headers

Gets the collection of HTTP response headers.

ReasonPhrase

Gets the HTTP reason phrase associated with this exception.

StatusCode

Gets the HTTP status code associated with this exception.

Methods

Name Description
ToString()

Returns a string that represents this instance.

TryParse(int, out HttpStatusCodeException)

Attempts to resolve a suitable httpStatusCodeException from the specified statusCode.

TryParse(int, string, out HttpStatusCodeException)

Attempts to resolve a suitable httpStatusCodeException from the specified statusCode.

TryParse(int, string, Exception, out HttpStatusCodeException)

Attempts to resolve a suitable httpStatusCodeException from the specified statusCode.

See Also