intelicoreact 1.4.17 → 1.4.19
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.
|
@@ -82,8 +82,8 @@ class RESTAPI extends _ApiBase.default {
|
|
|
82
82
|
const {
|
|
83
83
|
getBodyAs
|
|
84
84
|
} = item;
|
|
85
|
-
const finalIsGetBody =
|
|
86
|
-
const finalIsGetBodyFirst =
|
|
85
|
+
const finalIsGetBody = typeof item.isGetBody === 'boolean' || typeof item.isGetBody === 'string' ? item.isGetBody : isGetBody;
|
|
86
|
+
const finalIsGetBodyFirst = finalIsGetBody === 'first';
|
|
87
87
|
const checkResponseCallback = finalIsGetBodyFirst ? async (res, mesageOptions) => API_CONTEXT.getResponseBody(await API_CONTEXT.checkResponseCode(res, mesageOptions), getBodyAs) : async (res, mesageOptions) => API_CONTEXT.checkResponseCode(res, mesageOptions);
|
|
88
88
|
const callback = item.callback ? async res => item.callback(await checkResponseCallback(res, mesageOptions)) : async res => checkResponseCallback(res, mesageOptions);
|
|
89
89
|
return finalIsGetBody && !finalIsGetBodyFirst ? async res => API_CONTEXT.getResponseBody(await callback(res), getBodyAs) : callback;
|