🐛 Fix the way arrays are serialized for gmail and a few other nodes (#2289)

This commit is contained in:
Omar Ajoue 2021-10-06 20:05:28 +02:00 committed by GitHub
parent 86942c4ce7
commit a5e714f1c4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -251,12 +251,23 @@ async function parseRequestObject(requestObject: IDataObject) {
axiosConfig.params = requestObject.qs as IDataObject;
}
if (requestObject.useQuerystring === true) {
if (
requestObject.useQuerystring === true ||
// @ts-ignore
requestObject.qsStringifyOptions?.arrayFormat === 'repeat'
) {
axiosConfig.paramsSerializer = (params) => {
return stringify(params, { arrayFormat: 'repeat' });
};
}
// @ts-ignore
if (requestObject.qsStringifyOptions?.arrayFormat === 'brackets') {
axiosConfig.paramsSerializer = (params) => {
return stringify(params, { arrayFormat: 'brackets' });
};
}
if (requestObject.auth !== undefined) {
// Check support for sendImmediately
if ((requestObject.auth as IDataObject).bearer !== undefined) {