Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

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)

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

public class ExtractHttpHeader : ExtractionRule

NameDescription
System_CAPS_pubmethodExtractHttpHeader()

Initializes a new instance of the ExtractHttpHeader class.

NameDescription
System_CAPS_pubpropertyContextParameterName

Gets or sets the context name of the extracted property.(Inherited from ExtractionRule.)

System_CAPS_pubpropertyHeader

Gets or sets a value representing the name of the header whose value is to be extracted.

System_CAPS_pubpropertyRequired

Gets or sets a value that indicates whether the request fails if the header does not exist.

System_CAPS_pubpropertyRuleDescription

Obsolete.This method is no longer used. Use the DisplayNameAttribute on the class to set a description for this rule.(Inherited from ExtractionRule.)

System_CAPS_pubpropertyRuleName

Obsolete.This method is no longer used. Use the DisplayNameAttribute on the class to set a display name for this rule.(Inherited from ExtractionRule.)

NameDescription
System_CAPS_pubmethodEquals(Object)

(Inherited from Object.)

System_CAPS_pubmethodExtract(Object, ExtractionEventArgs)

Extracts the value of an HTTP header from the response and places the value and context parameter name into the WebTestContext.(Overrides ExtractionRule.Extract(Object, ExtractionEventArgs).)

System_CAPS_protmethodFinalize()

(Inherited from Object.)

System_CAPS_pubmethodGetHashCode()

(Inherited from Object.)

System_CAPS_pubmethodGetType()

(Inherited from Object.)

System_CAPS_protmethodMemberwiseClone()

(Inherited from Object.)

System_CAPS_pubmethodToString()

(Inherited from Object.)

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.

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

Return to top
Show: