TraceResponse method

void TraceResponse(
  1. IEwsHttpWebResponse response,
  2. MemoryStream memoryStream
)
Traces the response. The response. The response content in a MemoryStream.

Implementation

void TraceResponse(IEwsHttpWebResponse response, MemoryStream memoryStream) {
  this.ProcessHttpResponseHeaders(
      enumerations.TraceFlags.AutodiscoverResponseHttpHeaders, response);

  if (this.TraceEnabled) {
    if (!StringUtils.IsNullOrEmpty(response.ContentType) &&
        (response.ContentType.toLowerCase().startsWith("text/") ||
            response.ContentType.toLowerCase()
                .startsWith("application/soap"))) {
      this.TraceXml(
          enumerations.TraceFlags.AutodiscoverResponse, memoryStream);
    } else {
      this.TraceMessage(enumerations.TraceFlags.AutodiscoverResponse,
          "Non-textual response");
    }
  }
}