My call is like this,
const { get, post } = require('requestretry');
const { promisify } = require('util');
const [getAsync, postAsync] = [get, post].map(promisify);
const res = await postAsync({
url: "some url",
json: messageObj, // request body
maxAttempts: 5,
retryDelay: 1000
});
Where can i add custom header please? https://www.npmjs.com/package/requestretry?activeTab=readme
const res = await postAsync({
url: "some url",
headers: {...},
json: messageObj, // request body
maxAttempts: 5,
retryDelay: 1000
});
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.