ODataResponseBuilder responseBuilder =
ODataResponse.entity("bla").status(HttpStatusCodes.BAD_REQUEST).contentHeader("text/html");
if (context.getRequestUri() != null) {
responseBuilder.header("RequestUri", context.getRequestUri().toASCIIString());
PathInfo pathInfo = context.getPathInfo();
if (pathInfo == null) {
responseBuilder.header("PathInfo", "NULL");
} else {
responseBuilder.header("PathInfo", "TRUE");
responseBuilder.header("PathInfo.oDataSegments", pathInfo.getODataSegments().toString());
responseBuilder.header("PathInfo.precedingSegments", pathInfo.getPrecedingSegments().toString());
responseBuilder.header("PathInfo.requestUri", pathInfo.getRequestUri().toString());
responseBuilder.header("PathInfo.serviceRoot", pathInfo.getServiceRoot().toString());
}
}
Map<String, List<String>> requestHeaders = context.getRequestHeaders();
if (requestHeaders != null && requestHeaders.entrySet() != null) {