* @throws IOException If there is a problem in making the request.
*/
public int executeRequest(HttpMethod method,
String fullURL) throws IOException {
// Create a client for the connection
HttpClient client = new HttpClient();
// Timeout connections after 15 seconds
client.setConnectionTimeout(15000);
// Timeout connected sockets after 30 seconds
client.setTimeout(30000);
// Execute the method.
int statusCode = -1;
int attempt = 0;
// Retry the request up to 3 times
while ((statusCode == -1) && (attempt < 3)) {
statusCode = client.executeMethod(method);
attempt++;
}
// If the status code is still -1 then ran out of retries to
// connect to the server