Retrieving an HTTP response

Top  Previous  Next

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





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

© 2021 JSCAPE LLC