@oxyhq/core 3.4.7 → 3.4.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -602,7 +602,9 @@ class HttpService {
602
602
  * Build full URL with query params
603
603
  */
604
604
  buildURL(url, params) {
605
- const base = url.startsWith('http') ? url : `${this.baseURL}${url}`;
605
+ const base = /^https?:\/\//i.test(url)
606
+ ? url
607
+ : `${this.baseURL.replace(/\/+$/, '')}/${url.replace(/^\/+/, '')}`;
606
608
  if (!params || Object.keys(params).length === 0) {
607
609
  return base;
608
610
  }