/// <summary>
 /// Get a standard string representation of an HTTP response.
 /// </summary>
 /// <param name="response">The response message.</param>
 /// <returns>String representation of the response.</returns>
 public static string AsString(this CloudHttpResponseErrorInfo response)
 {
     StringBuilder text = new StringBuilder();
     text.AppendHttpResponse(response);
     return text.ToString();
 }
        /// <summary>
        /// Convert the CloudException into a helpful string.
        /// </summary>
        /// <returns></returns>
        public override string ToString()
        {
            // Get the original exception message (including the InnerException)
            StringBuilder text = new StringBuilder();
            text.AppendLine(base.ToString());
            text.AppendLine();

            // Tack on the request/response
            if (Request != null)
            {
                text.AppendHttpRequest(Request);
            }
            text.AppendLine();
            if (Response != null)
            {
                text.AppendHttpResponse(Response);
            }

            return text.ToString();
        }
 /// <summary>
 /// Get a standard string representation of an HTTP response.
 /// </summary>
 /// <param name="response">The response message.</param>
 /// <returns>String representation of the response.</returns>
 public static string AsString(this HttpResponseMessage response)
 {
     StringBuilder text = new StringBuilder();
     text.AppendHttpResponse(response);
     return text.ToString();
 }