// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System.Net; using System.Net.Http; using Microsoft.AspNet.Mvc; using Microsoft.Framework.Internal; using ShimResources = Microsoft.AspNet.Mvc.WebApiCompatShim.Resources; namespace System.Web.Http { public class HttpResponseException : Exception { /// /// Initializes a new instance of the class. /// /// The status code of the response. public HttpResponseException(HttpStatusCode statusCode) : this(new HttpResponseMessage(statusCode)) { } /// /// Initializes a new instance of the class. /// /// The response message. public HttpResponseException([NotNull] HttpResponseMessage response) : base(ShimResources.HttpResponseExceptionMessage) { Response = response; } /// /// Gets the to return to the client. /// public HttpResponseMessage Response { get; private set; } } }