src/http-api.js
function(path, queryParams, prefix) {
        let queryString = "";
        if (queryParams) {
            queryString = "?" + utils.encodeParams(queryParams);
        }
        return this.opts.baseUrl + prefix + path + queryString;
    }
function(path, queryParams, prefix) {
        let queryString = "";
        if (queryParams) {
            queryString = "?" + utils.encodeParams(queryParams);
        }
        return this.opts.baseUrl + prefix + path + queryString;
    }
function ( path , queryParams , prefix ) { let queryString = "" ; if ( queryParams ) { queryString = "?" + utils . encodeParams ( queryParams ) ; } return this . opts . baseUrl + prefix + path + queryString ; }
Form and return a homeserver request URL based on the given path
params and prefix.
@param {string} path The HTTP path <b>after</b> the supplied prefix e.g.
"/createRoom".
@param {Object} queryParams A dict of query params (these will NOT be
urlencoded).
@param {string} prefix The full prefix to use e.g.
"/_matrix/client/v2_alpha".
@return {string} URL
Form and return a homeserver request URL based on the given path params and prefix .