String[][] sutil.makeHEADRequest ( String url )


Retrieve the response header contents.


  • url URL encoded version of page request, as a string. Java provides a URLEncoder to aid in URL encoding of a string.

Return Values

Returns contents of the response, as a two-dimensional array.

Change Log

Version Description
5.0 Added for all editions.

This method will use any proxy settings that have been specified in the Settings dialog box..


Retrieve Page Contents

 // Log HEAD contents

 // Get head contents
 headerArray = sutil.makeHEADRequest("");

 // Loop through HEAD contents
 for (int i=0; i<headerArray.length; i++)
     // Write header to log
     session.log(headerArray[i][0] + ": " + headerArray[i][1]);

 /* Example Log:
 Date: Fri, 04 Jun 2010 17:18:11 GMT
 Server: Apache/2.2.3 (CentOS)
 X-Powered-By: PHP/5.1.6
 Connection: close
 Content-Type: text/html; charset=UTF-8

See Also