using System;
using System.Net;
namespace DevDefined.OAuth.Framework
{
///
/// Extends WebException. Calls to the underlying Response.GetResponseStream() will fail since the response body has already been read,
/// so the body is included in the property instead.
///
public class ParsedWebException : WebException
{
///
/// Initializes a new instance of the class with the specified error message, nested exception, status, and response.
///
/// The resposne body content
/// The text of the error message.
/// A nested exception.
/// One of the values.
/// A instance that contains the response from the remote host.
public ParsedWebException(string content, string message, Exception innerException, WebExceptionStatus status, WebResponse response)
: base(message, innerException, status, response)
{
ResponseContent = content;
}
///
/// The response body content
///
public string ResponseContent { get; private set; }
}
}