Facebook.WebExceptionWrapper.GetResponseStream C# (CSharp) Method

GetResponseStream() public method

public GetResponseStream ( ) : Stream
return Stream
        public virtual Stream GetResponseStream()
        {
            return _webException.Response.GetResponseStream();
        }

Usage Example

        /// <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);
        }
All Usage Examples Of Facebook.WebExceptionWrapper::GetResponseStream