From 764faaff9c5a3a34b4c822759c0a2184fae833a3 Mon Sep 17 00:00:00 2001 From: Ayoub-Mabrouk Date: Wed, 17 Dec 2025 01:08:19 +0100 Subject: [PATCH] refactor: replace Object.assign with spread operator in http-axios Replace Object.assign({}, defaultHeaders, {...}) with modern spread operator syntax for better readability and consistency with modern JavaScript patterns. --- lib/http-axios.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/http-axios.ts b/lib/http-axios.ts index 1783be71a..7dfd0f47a 100644 --- a/lib/http-axios.ts +++ b/lib/http-axios.ts @@ -23,9 +23,10 @@ export default class HTTPClient { const { baseURL, defaultHeaders } = config; this.instance = axios.create({ baseURL, - headers: Object.assign({}, defaultHeaders, { + headers: { + ...defaultHeaders, "User-Agent": USER_AGENT, - }), + }, }); this.instance.interceptors.response.use(