Hi there (pls ignore my previous post)

I'm using HttpClient to write a Cactus unit test. I'd
like to simulate a browser, sending a cookie to the
server with a request. So the cookie originates at the
client side :

HttpClient client = new HttpClient();
HttpMethod method = new getMethod(url);
String cookieValue = "testValue";
String cookieName = "testname";
Cookie cookie = new Cookie("localhost", cookieName,
cookieValue);
cookie.setPath("/");

HttpState httpState=new HttpState();
httpState.addCookie(cookie);
client.setState(httpState);

// Execute the method.
int statusCode = -1;
try {
  statusCode = client.executeMethod(method);
} catch (HttpRecoverableException e) {} 
  catch (IOException e) {}

// Read the response body.
byte[] responseBody = method.getResponseBody();

My question is this : I need to check whether the
server has set any additional cookies in the response.
How do i do this ? 

Any help greatly appreciated.

Regards
Jacques



=====
"All one's life is music, if one touches the notes rightly, and in time."
    - John Ruskin

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to