Add useQueryString option to HTTP Request Node (#1279)

This commit is contained in:
Ricardo Espinoza 2020-12-29 05:37:06 -05:00 committed by GitHub
parent 2f0c48f8d9
commit ea2d0920a8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -355,6 +355,13 @@ export class HttpRequest implements INodeType {
default: 10000,
description: 'Time in ms to wait for the server to send response headers (and start the response body) before aborting the request.',
},
{
displayName: 'Use Querystring',
name: 'useQueryString',
type: 'boolean',
default: false,
description: 'Set this option to true if you need arrays to be serialized as foo=bar&foo=baz instead of the default foo[0]=bar&foo[1]=baz.',
},
],
},
@ -683,6 +690,10 @@ export class HttpRequest implements INodeType {
requestOptions.timeout = options.timeout as number;
}
if (options.useQueryString === true) {
requestOptions.useQuerystring = true;
}
if (parametersAreJson === true) {
// Parameters are defined as JSON
let optionData: OptionData;