mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 10:02:05 +00:00
feat(HTTP Request Node): Interval Between Requests option for pagination (#8224)
## Summary Option to add delay between request when using pagination  ## Related tickets and issues https://linear.app/n8n/issue/NODE-1029/http-request-pagination-feature-doesnt-use-batch-settings https://github.com/n8n-io/n8n/issues/8062
This commit is contained in:
@@ -115,6 +115,7 @@ import {
|
||||
ExecutionBaseError,
|
||||
jsonParse,
|
||||
ApplicationError,
|
||||
sleep,
|
||||
} from 'n8n-workflow';
|
||||
import type { Token } from 'oauth-1.0a';
|
||||
import clientOAuth1 from 'oauth-1.0a';
|
||||
@@ -2748,6 +2749,9 @@ const getRequestHelperFunctions = (
|
||||
) as boolean;
|
||||
|
||||
if (makeAdditionalRequest) {
|
||||
if (paginationOptions.requestInterval) {
|
||||
await sleep(paginationOptions.requestInterval);
|
||||
}
|
||||
if (tempResponseData.statusCode < 200 || tempResponseData.statusCode >= 300) {
|
||||
// We have it configured to let all requests pass no matter the response code
|
||||
// via "requestOptions.simple = false" to not by default fail if it is for example
|
||||
|
||||
Reference in New Issue
Block a user