Skip to content

Commit

Permalink
⚡ Add user agent field to Plivo-Node (#2572)
Browse files Browse the repository at this point in the history
  • Loading branch information
huzaif-plivo authored Dec 15, 2021
1 parent a479f4f commit e505eea
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion packages/nodes-base/nodes/Plivo/GenericFunctions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ import {
NodeOperationError,
} from 'n8n-workflow';

import {
OptionsWithUri,
} from 'request';

/**
* Make an API request to Plivo.
*
Expand All @@ -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,
Expand Down

0 comments on commit e505eea

Please sign in to comment.