Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

config.headers.set is not a function #1530

Open
YaoChing opened this issue Jun 26, 2024 · 0 comments
Open

config.headers.set is not a function #1530

YaoChing opened this issue Jun 26, 2024 · 0 comments

Comments

@YaoChing
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant