From e505eea1bdb374a548cec93fd253c7e1c4640cb9 Mon Sep 17 00:00:00 2001 From: Mohammed Huzaif Date: Thu, 16 Dec 2021 02:37:25 +0530 Subject: [PATCH] :zap: Add user agent field to Plivo-Node (#2572) --- packages/nodes-base/nodes/Plivo/GenericFunctions.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/packages/nodes-base/nodes/Plivo/GenericFunctions.ts b/packages/nodes-base/nodes/Plivo/GenericFunctions.ts index 98ca7fa52f..f33f7deaeb 100644 --- a/packages/nodes-base/nodes/Plivo/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Plivo/GenericFunctions.ts @@ -9,6 +9,10 @@ import { NodeOperationError, } from 'n8n-workflow'; +import { + OptionsWithUri, +} from 'request'; + /** * Make an API request to Plivo. * @@ -32,7 +36,10 @@ export async function plivoApiRequest( throw new NodeOperationError(this.getNode(), 'No credentials returned!'); } - const options = { + const options: OptionsWithUri = { + headers: { + 'user-agent': 'plivo-n8n', + }, method, form: body, qs,