dist/corbel.with-polyfills.js
function(srcType, srcId, destType, destId) {

                var urlBase = this.driver.config.getCurrentEndpoint(corbel.Resources.moduleName, this._buildPort(this.driver.config));

                var domain = this.driver.config.get(corbel.Iam.IAM_DOMAIN, 'unauthenticated');
                var customDomain = this.driver.config.get(corbel.Domain.CUSTOM_DOMAIN, domain);

                this.driver.config.set(corbel.Domain.CUSTOM_DOMAIN, undefined);

                var uri = urlBase + customDomain + '/resource/' + srcType;

                if (srcId) {
                    uri += '/' + srcId;
                    if (destType) {
                        uri += '/' + destType;
                        if (destId) {
                            uri += ';r=' + destType + '/' + destId;
                        }
                    }
                }

                return uri;
            }
function(srcType, srcId, destType, destId) {

                var urlBase = this.driver.config.getCurrentEndpoint(corbel.Resources.moduleName, this._buildPort(this.driver.config));

                var domain = this.driver.config.get(corbel.Iam.IAM_DOMAIN, 'unauthenticated');
                var customDomain = this.driver.config.get(corbel.Domain.CUSTOM_DOMAIN, domain);

                this.driver.config.set(corbel.Domain.CUSTOM_DOMAIN, undefined);

                var uri = urlBase + customDomain + '/resource/' + srcType;

                if (srcId) {
                    uri += '/' + srcId;
                    if (destType) {
                        uri += '/' + destType;
                        if (destId) {
                            uri += ';r=' + destType + '/' + destId;
                        }
                    }
                }

                return uri;
            }
function ( srcType , srcId , destType , destId ) { var urlBase = this . driver . config . getCurrentEndpoint ( corbel . Resources . moduleName , this . _buildPort ( this . driver . config ) ) ; var domain = this . driver . config . get ( corbel . Iam . IAM_DOMAIN , 'unauthenticated' ) ; var customDomain = this . driver . config . get ( corbel . Domain . CUSTOM_DOMAIN , domain ) ; this . driver . config . set ( corbel . Domain . CUSTOM_DOMAIN , undefined ) ; var uri = urlBase + customDomain + '/resource/' + srcType ; if ( srcId ) { uri += '/' + srcId ; if ( destType ) { uri += '/' + destType ; if ( destId ) { uri += ';r=' + destType + '/' + destId ; } } } return uri ; }
Helper function to build the request uri
@param  {String} srcType     Type of the resource
@param  {String} srcId       Id of the resource
@param  {String} relType     Type of the relationed resource
@param  {String} destId      Information of the relationed resource
@return {String}             Uri to perform the request
Helper function to build the request uri