Add user agent field to Plivo-Node (#2572)

This commit is contained in:
Mohammed Huzaif 2021-12-16 02:37:25 +05:30 committed by GitHub
parent a479f4f084
commit e505eea1bd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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,