guanbo / awsapigateway

aws api gateway

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

awsapigateway

aws api gateway

Install

npm install awsapigateway

Quick Start

const APIGatewayService = require('apigateway');
const apigw = new APIGatewayService({accessKeyId: 'myKey', secretAccessKey: 'mySercret'});

const uri = encodeURI('https://xxxx.execute-api.cn-northwest-1.amazonaws.com.cn/dev');
const options = {
  encoding: null,
  headers: {
    'Content-Type': 'application/json'
  },
  body: "{foo: 'bar'}"

}
apigw.post(uri, options, (err, res)=>{
  console.log(res.body);
})

About

aws api gateway

License:MIT License


Languages

Language:JavaScript 100.0%