0.1.0 • Published 6 years ago

@sharecover-co/middy-http-response-serializer v0.1.0

Weekly downloads
219
License
ISC
Repository
-
Last release
6 years ago

HTTP Response Serializer Middleware

This middleware serializes the response to JSON and wraps it in a 200 HTTP response.

Install

To install this middleware you can use NPM:

npm install --save @sharecover-co/middy-http-response-serializer

Sample usage

const middy = require('@middy/core')
const httpResponseSerializer = require('@sharecover-co/middy-http-response-serializer')

const handler = middy((event, context, cb) => {
  cb(null, {})
})

handler.use(httpResponseSerializer())