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) {
|
||||
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() {
|
||||
return new ResponseBody(spec, contents);
|
||||
}
|
||||
|
@ -58,9 +58,8 @@ public final class WebServiceRequest {
|
||||
return ContentBodySpec.JSON_CONTENT_TYPE;
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public <T> T getHeader(String headerName) {
|
||||
return (T) headers.get(headerName);
|
||||
public <T> T getHeader(TypedKey<T> headerKey) {
|
||||
return headers.get(headerKey);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Loading…
Reference in New Issue
Block a user