0.0.5 • Published 5 years ago

lambda-edge-response v0.0.5

Weekly downloads
6
License
MIT
Repository
github
Last release
5 years ago

lambda-edge-response

A lightweight response payload builder for lambda@edge

Installation

  npm install lambda-edge-response

or

  yarn add lambda-edge-response

Usage

  const response = require('lambda-edge-response');

  module.exports.handler = (event, context, callback) => callback(null, response({
    statusCode: 200,
    headers: {
      'Content-Type': 'application/json'
    },
    body: {
      hello: 'world'
    }
  }));

or

  const response = require('lambda-edge-response');

  module.exports.handler = (event, context, callback) => callback(null, response({
    statusCode: 200,
    headers: {
      'Content-Type': 'text/plain'
    },
    body: 'Hello World'
  }));
0.0.5

5 years ago

0.0.4

5 years ago

0.0.3

5 years ago

0.0.2

5 years ago

0.0.1

5 years ago