Answers for "aws serverless nodejs"

0

how to call AWS Serverless api in Node/JS

var xhr = new XMLHttpRequest();
xhr.open('POST', 'https://API_ID.execute-api.API_REGION.amazonaws.com/STAGE/');
xhr.onreadystatechange = function (event) {
  console.log(event.target.response);
}
xhr.setRequestHeader('Content-Type', 'application/json');
xhr.send(JSON.stringify({age: 26, height: 71, income: 2100}));
Posted by: Guest on October-05-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language