Retrieving an HTTP response |
You may retrieve a response using the HttpSession#getResponse method. This will return an HttpResponse instance. You may obtain information about the HttpResponse in same way described when using the Http class.
Example
// create new HttpSession HttpSession session = new HttpSession();
// get response HttpResponse response = session.getResponse("http://www.server.com/path/to/cgi");
// print reponse body System.out.println(response.getBody()); |