lambda-http-utils

0.1.4 • Public • Published

lambda-http-utils

Build Status View on NPM View on NPM codecov

lambda-http-utils is a utility to make it easy to do parameter checking while developing serverless application like AWS Lambda + API Gateway.

Setup

Install:

npm install lambda-http-utils --save-dev

Example

const lambdaUtils = require('lambda-http-utils');

new lambdaUtils.HttpUtils.Builder(headers, body)
      .withHeaderVal('Content-Type', 'application/json')
      .withBody('some_key')
      .build()
      .check()
      .then((data) => {
        // Do something with parsed data...
      })
      .catch((err) => {
        // Something went wrong
      });

License

MIT. See LICENSE for details.

/lambda-http-utils/

    Package Sidebar

    Install

    npm i lambda-http-utils

    Weekly Downloads

    0

    Version

    0.1.4

    License

    MIT

    Unpacked Size

    8.9 kB

    Total Files

    10

    Last publish

    Collaborators

    • allanbian1017