@selfcommunity/api-services 0.6.7-payments.185 → 0.6.7-payments.186
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.
package/lib/cjs/client/index.js
CHANGED
|
@@ -52,7 +52,7 @@ class ApiClient {
|
|
|
52
52
|
this.setDefaultHeader({ name: 'Content-Type', value: 'application/json', methods: ['post'] });
|
|
53
53
|
}
|
|
54
54
|
createClient(config) {
|
|
55
|
-
return axios_1.default.create(Object.assign(Object.assign({}, (config && config.baseURL && { baseURL: config.baseURL })), { responseType: 'json', headers: Object.assign({}, (config && config.accessToken && { Authorization: `Token ${config.accessToken}` })), timeout: ApiClient.DEFAULT_TIMEOUT }));
|
|
55
|
+
return axios_1.default.create(Object.assign(Object.assign(Object.assign({}, (config && config.baseURL && { baseURL: config.baseURL })), (config && config.responseType ? { responseType: config.responseType } : { responseType: 'json' })), { headers: Object.assign({}, (config && config.accessToken && { Authorization: `Token ${config.accessToken}` })), timeout: ApiClient.DEFAULT_TIMEOUT }));
|
|
56
56
|
}
|
|
57
57
|
/**
|
|
58
58
|
* Get client instance
|
package/lib/esm/client/index.js
CHANGED
|
@@ -48,7 +48,7 @@ export class ApiClient {
|
|
|
48
48
|
this.setDefaultHeader({ name: 'Content-Type', value: 'application/json', methods: ['post'] });
|
|
49
49
|
}
|
|
50
50
|
createClient(config) {
|
|
51
|
-
return axios.create(Object.assign(Object.assign({}, (config && config.baseURL && { baseURL: config.baseURL })), { responseType: 'json', headers: Object.assign({}, (config && config.accessToken && { Authorization: `Token ${config.accessToken}` })), timeout: ApiClient.DEFAULT_TIMEOUT }));
|
|
51
|
+
return axios.create(Object.assign(Object.assign(Object.assign({}, (config && config.baseURL && { baseURL: config.baseURL })), (config && config.responseType ? { responseType: config.responseType } : { responseType: 'json' })), { headers: Object.assign({}, (config && config.accessToken && { Authorization: `Token ${config.accessToken}` })), timeout: ApiClient.DEFAULT_TIMEOUT }));
|
|
52
52
|
}
|
|
53
53
|
/**
|
|
54
54
|
* Get client instance
|