mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-18 02:21:13 +00:00
✨ Add "Follow All Redirects" option to HTTP Request Node (#2046)
* redirect post/put/delete/patch requests * add redirect all option * ⚡ Minor improvement Co-authored-by: Jan Oberhauser <jan.oberhauser@gmail.com>
This commit is contained in:
@@ -308,11 +308,18 @@ export class HttpRequest implements INodeType {
|
||||
description: 'Returns the full reponse data instead of only the body.',
|
||||
},
|
||||
{
|
||||
displayName: 'Follow Redirect',
|
||||
displayName: 'Follow All Redirects',
|
||||
name: 'followAllRedirects',
|
||||
type: 'boolean',
|
||||
default: false,
|
||||
description: 'Follow non-GET HTTP 3xx redirects.',
|
||||
},
|
||||
{
|
||||
displayName: 'Follow GET Redirect',
|
||||
name: 'followRedirect',
|
||||
type: 'boolean',
|
||||
default: true,
|
||||
description: 'Follow HTTP 3xx redirects.',
|
||||
description: 'Follow GET HTTP 3xx redirects.',
|
||||
},
|
||||
{
|
||||
displayName: 'Ignore Response Code',
|
||||
@@ -695,6 +702,11 @@ export class HttpRequest implements INodeType {
|
||||
if (options.followRedirect !== undefined) {
|
||||
requestOptions.followRedirect = options.followRedirect as boolean;
|
||||
}
|
||||
|
||||
if (options.followAllRedirects !== undefined) {
|
||||
requestOptions.followAllRedirects = options.followAllRedirects as boolean;
|
||||
}
|
||||
|
||||
if (options.ignoreResponseCode === true) {
|
||||
// @ts-ignore
|
||||
requestOptions.simple = false;
|
||||
|
||||
Reference in New Issue
Block a user