HTTP request helpers
// If no auth needed
const response = await this.helpers.httpRequest(options);
// If auth needed
const response = await this.helpers.httpRequestWithAuthentication.call(
this,
'credentialTypeName', // For example: pipedriveApi
options,
);{
url: string;
headers?: object;
method?: 'GET' | 'POST' | 'PUT' | 'DELETE' | 'HEAD';
body?: FormData | Array | string | number | object | Buffer | URLSearchParams;
qs?: object;
arrayFormat?: 'indices' | 'brackets' | 'repeat' | 'comma';
auth?: {
username: string,
password: string,
};
disableFollowRedirect?: boolean;
encoding?: 'arraybuffer' | 'blob' | 'document' | 'json' | 'text' | 'stream';
skipSslCertificateValidation?: boolean;
returnFullResponse?: boolean;
proxy?: {
host: string;
port: string | number;
auth?: {
username: string;
password: string;
},
protocol?: string;
};
timeout?: number;
json?: boolean;
} Example
Deprecation of the previous helper
Migration guide to the new helper
Last updated
Was this helpful?