Added methods with TypedKeys
This commit is contained in:
parent
8122deb364
commit
08d3827dae
|
@ -42,7 +42,12 @@ public final class ResponseBody extends ContentBody {
|
||||||
public Builder put(String paramName, Object content, Type typeOfContent) {
|
public Builder put(String paramName, Object content, Type typeOfContent) {
|
||||||
return (Builder) super.put(paramName, content, typeOfContent);
|
return (Builder) super.put(paramName, content, typeOfContent);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public <T> Builder put(TypedKey<T> paramKey, T param) {
|
||||||
|
return (Builder) super.put(paramKey, param);
|
||||||
|
}
|
||||||
|
|
||||||
public ResponseBody build() {
|
public ResponseBody build() {
|
||||||
return new ResponseBody(spec, contents);
|
return new ResponseBody(spec, contents);
|
||||||
}
|
}
|
||||||
|
|
|
@ -58,9 +58,8 @@ public final class WebServiceRequest {
|
||||||
return ContentBodySpec.JSON_CONTENT_TYPE;
|
return ContentBodySpec.JSON_CONTENT_TYPE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@SuppressWarnings("unchecked")
|
public <T> T getHeader(TypedKey<T> headerKey) {
|
||||||
public <T> T getHeader(String headerName) {
|
return headers.get(headerKey);
|
||||||
return (T) headers.get(headerName);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
Loading…
Reference in New Issue
Block a user