Skip to content

Commit

Permalink
feat(HTTP Request Node): Add option to disable lowercase headers (#10154
Browse files Browse the repository at this point in the history
)
  • Loading branch information
maspio authored and cstuncsik committed Jul 31, 2024
1 parent 27f1be3 commit 3a7ffac
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion packages/nodes-base/nodes/HttpRequest/V3/HttpRequestV3.node.ts
Original file line number Diff line number Diff line change
Expand Up @@ -806,6 +806,13 @@ export class HttpRequestV3 implements INodeType {
],
default: 'brackets',
},
{
displayName: 'Lowercase Headers',
name: 'lowercaseHeaders',
type: 'boolean',
default: true,
description: 'Whether to lowercase header names',
},
{
displayName: 'Redirects',
name: 'redirect',
Expand Down Expand Up @@ -1388,6 +1395,7 @@ export class HttpRequestV3 implements INodeType {
allowUnauthorizedCerts,
queryParameterArrays,
response,
lowercaseHeaders,
} = this.getNodeParameter('options', itemIndex, {}) as {
batching: { batch: { batchSize: number; batchInterval: number } };
proxy: string;
Expand All @@ -1398,6 +1406,7 @@ export class HttpRequestV3 implements INodeType {
response: { neverError: boolean; responseFormat: string; fullResponse: boolean };
};
redirect: { redirect: { maxRedirects: number; followRedirects: boolean } };
lowercaseHeaders: boolean;
};

const url = this.getNodeParameter('url', itemIndex) as string;
Expand Down Expand Up @@ -1611,7 +1620,9 @@ export class HttpRequestV3 implements INodeType {
}
requestOptions.headers = {
...requestOptions.headers,
...keysToLowercase(additionalHeaders),
...(lowercaseHeaders === undefined || lowercaseHeaders
? keysToLowercase(additionalHeaders)
: additionalHeaders),
};
}

Expand Down

0 comments on commit 3a7ffac

Please sign in to comment.