- String tt = p.format == Format.XML ? "application/xml" : "application/json";
- String tt1 = tt + ";charset=UTF-8";
- if (p.contentType != null) {
- tt = p.contentType;
- tt1 = p.contentType;
+ String accept = p.accept;
+ if(accept == null) {
+ accept = p.format == Format.XML ? "application/xml" : "application/json";
+ }
+ String contentType = p.contentType;
+ if(contentType == null) {
+ contentType = accept + ";charset=UTF-8";