using System.Net;
using System.Net.Http;
namespace MediaBrowser.Common.Net;
///
/// An that retains the body of the failed response.
///
///
/// Providers report why they refused a request in the response body, which
/// discards.
///
public class HttpResponseBodyException : HttpRequestException
{
///
/// Initializes a new instance of the class.
///
/// The exception message.
/// The status code of the failed response.
/// The body of the failed response.
public HttpResponseBodyException(string message, HttpStatusCode? statusCode, string? responseBody)
: base(message, null, statusCode)
{
ResponseBody = responseBody;
}
///
/// Gets the body of the failed response.
///
public string? ResponseBody { get; }
}