httpMethod = getMethod(request);
if (httpMethod != null) {
copyHeaders(request, httpMethod);
return httpClient.execute(httpMethod);
} else {
throw new StrategyException(request.getId() + ": Unknown method.");
}
} catch (IOException e) {
String method = (httpMethod != null) ? httpMethod.getMethod() : "Unknown";
throw new StrategyException(request.getId() + ": while executing HTTP " +
method + ": ", e);
}
}