diff --git a/packages/@n8n/task-runner/src/runner-types.ts b/packages/@n8n/task-runner/src/runner-types.ts index e4e76189e2..7b13e8fe70 100644 --- a/packages/@n8n/task-runner/src/runner-types.ts +++ b/packages/@n8n/task-runner/src/runner-types.ts @@ -119,6 +119,9 @@ export const EXPOSED_RPC_METHODS = [ // httpRequest(opts: IHttpRequestOptions): Promise 'helpers.httpRequest', + + // (deprecated) request(uriOrObject: string | IRequestOptions, options?: IRequestOptions): Promise; + 'helpers.request', ]; /** Helpers that exist but that we are not exposing to the Code Node */ diff --git a/packages/cli/src/task-runners/task-managers/__tests__/task-manager.test.ts b/packages/cli/src/task-runners/task-managers/__tests__/task-manager.test.ts index 3066f25cfd..226f491908 100644 --- a/packages/cli/src/task-runners/task-managers/__tests__/task-manager.test.ts +++ b/packages/cli/src/task-runners/task-managers/__tests__/task-manager.test.ts @@ -30,6 +30,7 @@ describe('TaskRequester', () => { ['helpers.setBinaryDataBuffer', [{ data: '123' }, Buffer.from('data').toJSON()]], ['helpers.binaryToString', [Buffer.from('data').toJSON(), 'utf8']], ['helpers.httpRequest', [{ url: 'http://localhost' }]], + ['helpers.request', [{ url: 'http://localhost' }]], ])('should handle %s rpc call', async (methodName, args) => { const executeFunctions = set({}, methodName.split('.'), jest.fn());