htmlunit cookie/refer question -
testing out java htmlunit lib. trying figure out if there's way set/delete cookie file (cookiejar) used webclient object..
i've searched multiple docs, htmlunit api no luck, i'm assuming i'm missing something.
also, there way see headers (request/respnse/referer) being xfered between client/server during testing...
thanks
tom
you can use webclient.getcookiemanager()
, , can subclass httpwebconnection as:
webclient.setwebconnection(new httpwebconnection(webclient) { public webresponse getresponse(webrequestsettings settings) throws ioexception { system.out.println(settings.geturl()); return super.getresponse(settings); } });
Comments
Post a Comment