rest-client-sdk 6.7.1 → 6.7.2
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/dist/index.es.js +7 -3
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +7 -3
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/client/AbstractClient.ts +6 -3
package/package.json
CHANGED
|
@@ -461,10 +461,13 @@ class AbstractClient<D extends MetadataDefinition> {
|
|
|
461
461
|
requestParams: RequestInit
|
|
462
462
|
): Promise<Response> {
|
|
463
463
|
let params = requestParams;
|
|
464
|
+
let baseHeaders: HeadersInit = {};
|
|
464
465
|
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
466
|
+
if (params.method !== 'GET' || (params.method !== 'GET' && params.method !== 'DELETE')) {
|
|
467
|
+
baseHeaders = {
|
|
468
|
+
'Content-Type': 'application/json',
|
|
469
|
+
};
|
|
470
|
+
}
|
|
468
471
|
|
|
469
472
|
if (accessToken) {
|
|
470
473
|
baseHeaders.Authorization = `${this.sdk.config.authorizationType} ${accessToken}`;
|