Created
June 27, 2021 06:51
-
-
Save yai333/f23ab0665a8b4653102666a98e2bbb8f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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