Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
setupUrl(requestUrl, method, options) {
const { host = '', data } = options;
const baseUrl = `${host}${requestUrl}`;
if (data && this.isRetrieve(method)) {
const params = serializeQueryParams(data);
const delimeter = baseUrl.indexOf('?') === -1 ? '?' : '&';
return `${baseUrl}${delimeter}${params}`;
}
return baseUrl;
},