HttpResponseException Class¶
- Namespace
System.Web.Http
- Assemblies
- Microsoft.AspNetCore.Mvc.WebApiCompatShim
Inheritance Hierarchy¶
System.Object
System.Exception
System.Web.Http.HttpResponseException
Syntax¶
public class HttpResponseException : Exception, ISerializable, _Exception
-
class
System.Web.Http.
HttpResponseException
Constructors¶
-
HttpResponseException
(System.Net.Http.HttpResponseMessage)¶ Initializes a new instance of the
System.Web.Http.HttpResponseException
class.Arguments: response (System.Net.Http.HttpResponseMessage) – The response message. public HttpResponseException(HttpResponseMessage response)
-
HttpResponseException
(System.Net.HttpStatusCode) Initializes a new instance of the
System.Web.Http.HttpResponseException
class.Arguments: statusCode (System.Net.HttpStatusCode) – The status code of the response. public HttpResponseException(HttpStatusCode statusCode)
-
Properties¶
-
System.Web.Http.HttpResponseException.
Response
¶ Gets the
System.Net.Http.HttpResponseMessage
to return to the client.Return type: System.Net.Http.HttpResponseMessage public HttpResponseMessage Response { get; }
-