From: Chris P. <ch...@fo...> - 2004-01-16 10:37:18
|
G'day, Very sorry to ask what must be a FAQ (am running latest httpclient as per FAQ on cookies) but I am brand new to htmlunit and the list archive is dead, see <http://sourceforge.net/mailarchive/forum.php?forum=htmlunit-user>. I would like a simple example of how to set a cookie in the WebClient request header. I've tried the obvious: web_client.addRequestHeader("Cookie", COOKIE); page = (HtmlPage) web_client.getPage("http://localhost/cgi-bin/printenv"); but the response doesn't have HTTP_COOKIE set (pointing Mozilla at this URL with a set cookie works fine). Running: htmlunit-1.2.3 commons-httpclient-2.0-rc2 Been googling all day and can't see where I'm going wrong... TIA, Chris. |