dce-reactkit 3.7.18 → 3.7.20
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/package.json
CHANGED
|
@@ -123,12 +123,27 @@ const visitServerEndpoint = async (
|
|
|
123
123
|
);
|
|
124
124
|
}
|
|
125
125
|
|
|
126
|
+
// Process params (encode objects)
|
|
127
|
+
let params: {
|
|
128
|
+
[key: string]: any,
|
|
129
|
+
} | undefined;
|
|
130
|
+
if (opts.params) {
|
|
131
|
+
params = {};
|
|
132
|
+
Object.entries(opts.params).forEach(([key, value]) => {
|
|
133
|
+
if (typeof value === 'object') {
|
|
134
|
+
(params as any)[key] = JSON.stringify(value);
|
|
135
|
+
} else {
|
|
136
|
+
(params as any)[key] = value;
|
|
137
|
+
}
|
|
138
|
+
});
|
|
139
|
+
}
|
|
140
|
+
|
|
126
141
|
// Send the request
|
|
127
142
|
const sendRequest = await getSendRequest();
|
|
128
143
|
const response = await sendRequest({
|
|
129
144
|
path: opts.path,
|
|
130
145
|
method: opts.method ?? 'GET',
|
|
131
|
-
params
|
|
146
|
+
params,
|
|
132
147
|
});
|
|
133
148
|
|
|
134
149
|
// Check for failure
|