resource.header(p.getKey(), String.valueOf(p.getValue()));
}
for (Map.Entry<String, Object> p : cookieParams.entrySet()) {
Cookie cookie = new Cookie(p.getKey(), String.valueOf(p.getValue()));
resource.cookie(cookie);
}
resource.contentType(getContentType());
resource.accept(getAccepts());