aws4-axios icon indicating copy to clipboard operation
aws4-axios copied to clipboard

config.headers.set is not a function

Open YaoChing opened this issue 8 months ago • 0 comments

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 } });

YaoChing avatar Jun 26 '24 08:06 YaoChing