ZennoLab Assemblies Documentation
GetPairs(String,String,Boolean) Method
Example 
ZennoLab.InterfacesLibrary.ProjectModel Namespace > ICookieContainer Interface > GetPairs Method : GetPairs(String,String,Boolean) Method

Type: System.String

The host.

Type: System.String

The path.

Type: System.Boolean

The secure flag. The cookie item does not correspond to the isSecure flag if isSecure = false and item.IsSecure = true, otherwise, it correspond.

Gets a collection of cookie strings corresponding to the host, path and secure flag. Format is "name=value"
Syntax

Parameters

host

Type: System.String

The host.

path

Type: System.String

The path.

isSecure

Type: System.Boolean

The secure flag. The cookie item does not correspond to the isSecure flag if isSecure = false and item.IsSecure = true, otherwise, it correspond.

Return Value

Type: System.Collection.Generic.IEnumerable<String>

The cookie strings collection.

Example
The following code example demonstrates the GetPairs method.
// http request
ZennoPoster.HTTP.Request(InterfacesLibrary.Enums.Http.HttpMethod.GET, "https://zennolab.com", cookieContainer: project.Profile.CookieContainer);
// get cookie items
var items = project.Profile.CookieContainer.GetPairs("zennolab.com", "/", false);
// output to log info of cookie item
foreach(var item in items)
{
    project.SendInfoToLog(item);
}
Requirements

Target Platforms: Desktop: Windows XP SP3 and older. Server: Windows Server 2003 and older.

See Also

Reference

ICookieContainer Interface
ICookieContainer Members
Overload List