net.sf.antcontrib.net

Class PostTask.Cookie

public class PostTask.Cookie extends Object

Represents a cookie. See RFC 2109 and 2965.
Constructor Summary
Cookie(String raw)
Cookie(String name, String value)
Method Summary
StringgetDomain()
StringgetId()
StringgetName()
StringgetPath()
StringgetValue()
voidsetDomain(String domain)
voidsetPath(String path)
StringtoString()

Constructor Detail

Cookie

public Cookie(String raw)

Parameters: raw the raw string abstracted from the header of an http response for a single cookie.

Cookie

public Cookie(String name, String value)

Parameters: name name of the cookie value the value of the cookie

Method Detail

getDomain

public String getDomain()

Returns: the domain of the cookie

getId

public String getId()

Returns: the id of the cookie, used internally by Post to store the cookie in a hashtable.

getName

public String getName()

Returns: the name of the cookie

getPath

public String getPath()

Returns: the path of the cookie

getValue

public String getValue()

Returns: the value of the cookie

setDomain

public void setDomain(String domain)

Parameters: the domain of the cookie

setPath

public void setPath(String path)

Parameters: path the path of the cookie

toString

public String toString()

Returns: a Cookie formatted as a Cookie Version 1 string. The returned string is suitable for including with an http request.