if (request == null) {
throw new IllegalArgumentException("HTTP request may not be null");
}
// Add default headers
Collection<?> defHeaders = (Collection<?>) request.getParams().getParameter(
ClientPNames.DEFAULT_HEADERS);
if (defHeaders != null) {
for (Object defHeader : defHeaders) {
request.addHeader((Header) defHeader);
}
}