Get
-
AWS Lambda Node.js 로 api call 하기Computer Science/Aws 2022. 9. 29. 17:06
람다에서 함수를 생성후 post 로 api call 함수를 만들어 봤다. data 까지 추가하여서 진행하는 원본은 아래와 같다. http 80 으로 보내려면 require 의 https 를 http로 변환하면 된다. const https = require('https'); const doPostRequest = () => { const data = { value1: 1, value2: 2, }; return new Promise((resolve, reject) => { const options = { host: 'www.example.com', path: '/post/example/action', method: 'POST', headers: { 'Content-Type': 'application/json..