aws4-axios
aws4-axios copied to clipboard
config.headers.set is not a function
When I have set the parameters, this problem will occur when executing the script. Does anyone know what I did wrong?
const interceptor = aws4Interceptor({ options: { region: process.env.aws_region || "", service: "execute-api" }, credentials: { accessKeyId: process.env.access_key_id || "", secretAccessKey: process.env.secret_access_key || "" }, });
let result = await axios({ method: "POST", url: api_url, data: data, headers: { 'Content-Type': 'application/json', 'x-amz-access-token': token } });