CreateResponse createResponse = (CreateResponse) result;
if (createResponse.hasId())
{
final ProtocolVersion protocolVersion = ((ServerResourceContext) routingResult.getContext()).getRestliProtocolVersion();
String stringKey = URIParamUtils.encodeKeyForUri(createResponse.getId(), UriComponent.Type.PATH_SEGMENT, protocolVersion);
UriBuilder uribuilder = UriBuilder.fromUri(request.getURI());
uribuilder.path(stringKey);
headers.put(RestConstants.HEADER_LOCATION, uribuilder.build((Object) null).toString());
}
IdResponse<?> idResponse = new IdResponse<Object>(createResponse.getId());
//Verify that a null status was not passed into the CreateResponse. If so, this is a developer error.
if (createResponse.getStatus() == null)