WebTestResponse.Headers Property
Gets the headers associated with the response from the server.
Namespace: Microsoft.VisualStudio.TestTools.WebTesting
Assembly: Microsoft.VisualStudio.QualityTools.WebTestFramework (in Microsoft.VisualStudio.QualityTools.WebTestFramework.dll)
Syntax
'Declaration
Public Property Headers As WebHeaderCollection
public WebHeaderCollection Headers { get; internal set; }
public:
property WebHeaderCollection^ Headers {
WebHeaderCollection^ get ();
internal: void set (WebHeaderCollection^ value);
}
member Headers : WebHeaderCollection with get, internal set
function get Headers () : WebHeaderCollection
internal function set Headers (value : WebHeaderCollection)
Property Value
Type: WebHeaderCollection
A WebHeaderCollection collection.
Exceptions
Exception | Condition |
---|---|
ObjectDisposedException | The current instance has been disposed. |
Remarks
The Headers property is a collection of name/value pairs that contains the HTTP header values returned with the response. Common header information returned from the Internet resource is exposed as properties of the WebTestResponse class. The following table lists common headers that the API exposes as properties.
Header |
Property |
---|---|
Content-Encoding |
|
Content-Length |
|
Content-Type |
|
Last-Modified |
|
Server |
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.
See Also
Reference
Microsoft.VisualStudio.TestTools.WebTesting Namespace