Table of Contents

Class HttpResponseException

Namespace
System.Web.Http
Assembly
System.Web.Http.dll

An exception that allows for a given HttpResponseMessage to be returned to the client.

public class HttpResponseException : Exception, ISerializable
Inheritance
HttpResponseException
Implements
Inherited Members

Constructors

HttpResponseException(HttpResponseMessage)

Initializes a new instance of the HttpResponseException class.

public HttpResponseException(HttpResponseMessage response)

Parameters

response HttpResponseMessage

The HTTP response to return to the client.

HttpResponseException(HttpStatusCode)

Initializes a new instance of the HttpResponseException class.

public HttpResponseException(HttpStatusCode statusCode)

Parameters

statusCode HttpStatusCode

The status code of the response.

Properties

Response

Gets the HTTP response to return to the client.

public HttpResponseMessage Response { get; }

Property Value

HttpResponseMessage

The HttpResponseMessage that represents the HTTP response.