0.0.5 • Published 3 years ago

lambda-edge-response v0.0.5

Weekly downloads
6
License
MIT
Repository
github
Last release
3 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

3 years ago

0.0.4

3 years ago

0.0.3

3 years ago

0.0.2

3 years ago

0.0.1

3 years ago