Retrieving body of response

Top  Previous  Next

The body of an HTTP response is what is seen by your web browser. The body of an HTTP response contains data that could be in either binary or plain text formats, for example the retrieval of an image v.s. that of an HTML document. To accommodate this the HTTP component provides methods in the HttpResponse class for retrieving body content as a byte[] or as a String.

 

 

Example

 

// get body content as a byte[]

byte[] content = response.getBodyData();

 

 

Example

 

// get body content as a String

String content = response.getBody();





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

© 2021 JSCAPE LLC