Issuing multiple HTTP requests in order

Top  Previous  Next

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());

 

 

 





Home | Company | Products | Solutions | Purchase | Support | Services | Blog

© 2021 JSCAPE LLC