@Override
public <T> T getEntity(Class<T> clazz) {
ContentType contentType = ContentType.parse(response.getEntity().getContentType().getValue());
ContentHandler handler = ContentHandlers.getInstance().forType(contentType,originalAccept);
return handler.unmarshal(payload, clazz);
}
}