Issuing multiple HTTP requests in order |
To issue multiple HTTP requests in order you may invoke the HttpSession#getResponse method for each request in order. All cookie data will be handled automatically and sent with each request.
Example
// create new HttpSession HttpSession session = new HttpSession();
// get first page session.getResponse("http://www.server.com/page1");
// get second page session.getResponse("http://www.server.com/page2");
// get last page and print body to console HttpResponse response = session.getResponse("http://www.server.com/page3"); System.out.println(response.getBody());
|