I made a small modification to my local copy of webharvest05 to get access to HttpClient's client object after the processor runs. I need to get the cookies, but other people might want to check other params. Is there a way to check this into the main trunk?
in HttpClientManager.java add:
public HttpClient getClient() {
return this.client;
}
we could also add a convenience method returning just the cookies if you think people would want it:
public Map getCookies() {
Cookie[] cookies = this.client.getState().getCookies();
Map res =
...convert org.apache.commons.httpclient.Cookie[] into hashmap...
return res;
}
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Yes, there were several issues for this feature. I'm going to somehow add it for the following release. I'm thinking about supplying functions like: sys.getCookie(...), sys.getHeader(...) etc. that would be available from the evaluation context, like ....${...sys.getCookie()...}....
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I made a small modification to my local copy of webharvest05 to get access to HttpClient's client object after the processor runs. I need to get the cookies, but other people might want to check other params. Is there a way to check this into the main trunk?
in HttpClientManager.java add:
we could also add a convenience method returning just the cookies if you think people would want it:
public Map getCookies() {
Cookie[] cookies = this.client.getState().getCookies();
Map res =
...convert org.apache.commons.httpclient.Cookie[] into hashmap...
return res;
}
Yes, there were several issues for this feature. I'm going to somehow add it for the following release. I'm thinking about supplying functions like: sys.getCookie(...), sys.getHeader(...) etc. that would be available from the evaluation context, like ....${...sys.getCookie()...}....