Aracılığıyla paylaş


ExtractHttpHeader Class

Used to extract an HTTP header value from the response and place the value of the header into the WebTestContext.

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

Syntax

'Declaration
Public Class ExtractHttpHeader _
    Inherits ExtractionRule
'Usage
Dim instance As ExtractHttpHeader
public class ExtractHttpHeader : ExtractionRule
public ref class ExtractHttpHeader : public ExtractionRule
public class ExtractHttpHeader extends ExtractionRule

Remarks

Consider the following HTTP headers:

Content-Length : 2036

Cache-Control : private

Content-Type : text/html; charset=utf-8

If Header is set to Content-Length, this rule will extract 2036 from the headers.

Inheritance Hierarchy

System.Object
  Microsoft.VisualStudio.TestTools.WebTesting.ExtractionRule
    Microsoft.VisualStudio.TestTools.WebTesting.Rules.ExtractHttpHeader

Thread Safety

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

See Also

Reference

ExtractHttpHeader Members

Microsoft.VisualStudio.TestTools.WebTesting.Rules Namespace

Other Resources

Working with Web Tests

How to: Create a Custom Extraction Rule

How to: Add an Extraction Rule to a Web Test