code: protected String buildContextURL(ODataRequestContext requestContext, Object data) throws ODataRenderException {
          ODataUri oDataUri = requestContext.getUri();
          if (ODataUriUtil.isActionCallUri(oDataUri) || ODataUriUtil.isFunctionCallUri(oDataUri)) {
              return buildContextUrlFromOperationCall(oDataUri, requestContext.getEntityDataModel(),
                      isListOrStream(data));
          }
  
          Option<String> contextURL;
          if (isWriteOperation(requestContext)) {
              contextURL = getContextUrlWriteOperation(oDataUri);
          } else {
              contextURL = getContextUrl(oDataUri);
          }
          checkContextURL(requestContext, contextURL);
          return contextURL.get();
      }
docs: Build the 'Context URL' from a given OData request context.
  
  @param requestContext The given OData request context
  @param data           Result data
  @return The built 'Context URL'
  @throws ODataRenderException If unable to build context url