Export (0) Print
Expand All

WebTestResponse Class

Represents an HTTP response.

System.Object
  Microsoft.VisualStudio.TestTools.WebTesting.WebTestResponse

Namespace:  Microsoft.VisualStudio.TestTools.WebTesting
Assembly:  Microsoft.VisualStudio.QualityTools.WebTestFramework (in Microsoft.VisualStudio.QualityTools.WebTestFramework.dll)

[SerializableAttribute]
public class WebTestResponse : ICloneable

The WebTestResponse type exposes the following members.

  NameDescription
Public propertyBodyBytesGets the raw bytes of the HTTP response body.
Public propertyBodyStringGets a string version of the response body for responses with text, HTML, or XML content types.
Public propertyCharacterSetGets the character set that is specified in the response headers.
Public propertyContentEncodingGets the method that is used to encode the body of the response.
Public propertyContentLengthGets the length of the content that is returned by the request.
Public propertyContentTypeGets the MIME type of the response body.
Public propertyCookiesGets the cookies associated with the response.
Public propertyHeadersGets the headers associated with the response from the server.
Public propertyHtmlDocumentGets the HtmlDocument created by parsing the response body of a response with HTML or XHTML content type.
Public propertyIsBodyEmptyGets a value indicating whether the response body is empty.
Public propertyIsHtmlGets a value indicating whether the response body is an HTML document.
Public propertyIsTextGets a value indicating whether the response body is a text document.
Public propertyIsXmlGets a value that indicates whether the response is XML.
Public propertyLastModifiedGets the last date and time that the contents of the response were modified.
Public propertyMethodGets the method that is used to return the response.
Public propertyProtocolVersionGets the version of the HTTP protocol that is used in the response.
Public propertyResponseUriGets the URI of the Internet resource that responded to the request.
Public propertyServerGets the name of the server that sent the response.
Public propertyStatisticsGets detailed information gathered during the execution of the request.
Public propertyStatusCodeGets the status of the response.
Public propertyStatusDescriptionGets the status description returned with the response.
Public propertyXmlDocumentGets a XmlDocument representing the response body if the content type indicated the response was XML.
Top

  NameDescription
Public methodCloneClones the test response body.
Public methodEqualsDetermines whether the specified Object is equal to the current Object. (Inherited from Object.)
Protected methodFinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public methodGetHashCodeServes as a hash function for a particular type. (Inherited from Object.)
Public methodGetTypeGets the Type of the current instance. (Inherited from Object.)
Protected methodMemberwiseCloneCreates a shallow copy of the current Object. (Inherited from Object.)
Public methodToStringReturns a string that represents the current object. (Inherited from Object.)
Top

This encapsulates an HTTP response that is provided by a HttpWebResponse. Many HTTP features are exposed through the WebTestResponse properties.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Community Additions

ADD
Show:
© 2014 Microsoft