Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

⚡ Add useQueryString option #1279

Merged
merged 1 commit into from Dec 29, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
11 changes: 11 additions & 0 deletions packages/nodes-base/nodes/HttpRequest.node.ts
Expand Up @@ -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.',
},
],
},

Expand Down Expand Up @@ -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;
Expand Down