Skip to content

Instantly share code, notes, and snippets.

@yai333
Created June 27, 2021 06:51
Show Gist options
  • Save yai333/f23ab0665a8b4653102666a98e2bbb8f to your computer and use it in GitHub Desktop.
Save yai333/f23ab0665a8b4653102666a98e2bbb8f to your computer and use it in GitHub Desktop.
const { data } = await axios.post(
"/login",
{
address,
signature,
},
{
headers: {
'Content-Type': 'application/json',
},
}
);
const aws = new AwsClient({
accessKeyId: data.AccessKeyId,
secretAccessKey: data.SecretKey,
sessionToken: data.SessionToken,
region: 'ap-southeast-2',
service: 'execute-api',
});
await aws.sign(
"/hello?name=YA",
{
method: 'GET',
}
);
const response = await fetch(request);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment