Skip to content

Commit b35c547

Browse files
committed
feat(config): allow base url and headers replacement
1 parent ee383b7 commit b35c547

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/index.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -280,12 +280,12 @@ class NetatmoClient {
280280
// eslint-disable-next-line @typescript-eslint/no-explicit-any
281281
async request(method: 'GET' | 'POST', path: string, params: Record<string, any> | null = null, data: querystring.ParsedUrlQueryInput | null = null, isRetry: boolean = false): Promise<any> {
282282
const config: AxiosRequestConfig = {
283-
...this.requestConfig,
284-
method,
285283
baseURL,
286-
url: path,
287284
headers: {
288285
},
286+
...this.requestConfig,
287+
method,
288+
url: path,
289289
}
290290
if (data) {
291291
// as POST method accept only `application/x-www-form-urlencoded` content-type, transform data object into query string

0 commit comments

Comments
 (0)