response.setEntity(wrapResponse(dataMap, restResponse.getHeaders(), ProtocolVersionUtil.extractProtocolVersion(response.getHeaders())));
return response;
}
catch (IOException e)
{
throw new RestLiDecodingException("Could not decode REST response", e);
}
catch (InstantiationException e)
{
throw new IllegalStateException(e);
}