Response GetHeaderValue Method (String, Int32)C# API
Gets the value of the nth instance of an HTTP response header contained in this Response.

Namespace: Facilita.Web
Assembly: clrWebBrowser (in clrWebBrowser.dll) Version: 9.5.5.77 (1.0.0.0)
Syntax

public virtual string GetHeaderValue(
	string header,
	int index
)

Parameters

header
Type: System String
The HTTP response header to look for.
index
Type: System Int32
The zero-based index of the response header to look for.

Return Value

The value of the header, or an empty string if the header does not exist.
Examples

The following example demonstrates getting the value of the second "Set-Cookie" header.
if (response.ContainsHeader("Set-Cookie")) 
{ 
    // Get the value of the 2nd Set-Cookie header in the response 
    string lastModified = response.GetHeaderValue("Set-Cookie", 1);
    ... 
}
See Also