public virtual Stream GetResponseStream()
{
return _webException.Response.GetResponseStream();
}
/// <summary> /// Gets the response string from web exception. /// </summary> /// <param name="webException"> /// The web exception. /// </param> /// <returns> /// Response string. /// </returns> internal static string GetResponseString(WebExceptionWrapper webException) { if (webException.HasResponse) { using (var stream = webException.GetResponseStream()) { if (stream != null) { using (var reader = new StreamReader(stream)) { return(reader.ReadToEnd()); } } } } return(null); }