@sharecover-co/middy-http-response-serializer
v0.1.0
Published
HTTP Response Serializer Middleware ===================================
Downloads
285
Keywords
Readme
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())