lambda-api
lambda-api copied to clipboard
Lightweight web framework for your serverless applications
When i am hitting the route its returning "method not allowed"
When lambda-api can not find a method for a path, it automatically sends back a HTTP 405 Method Not Allowed error, via MethodError. Per the [HTTP rfc 7231](https://datatracker.ietf.org/doc/html/rfc7231#page-59), the Allow...
What's the correct way to remove the authorization header from being passed along with a redirect? This is what I'm doing now: res.removeHeader('authorization').redirect(signedUrl); Which doesn't seem to work. My original...
I converted a route to Typescript and things went 💥 Turns out the type definition for the logger methods only expects a string.  This PR makes it behave in...
Path parameters should be decoded by the library. This allows application code to use the parameters directly, without decoding it themselves.
Currently the use function allows for inputs to be either Middleware or ErrorHandlingMiddleware. However, the typescript type requires the list of arguments to be only Middleware or only ErrorHandlingMiddleware. I.e....
It is valid to chain `response.type('application/xml').status(200).send(xml)` because the `type` function returns an instance of **this**. This change correct the `index.d.ts` typing description from incorrectly returning **void** to correctly returning **this**...
Lambda api: 0.10.1 I have this API: ``` const api = require('lambda-api')({base: 'v2'}) , middleware = require('../utils/middleware') , LiveblogApi = require('../apis/liveblogApi'); //apply middlewares api.use(middleware.addCorsHeaders); api.use(middleware.logRequest); api.use(['/data/*'], middleware.authorize); api.use(middleware.populateCommonHeaders); api.use(middleware.errorHandler); api.post('/data/pbp/:eventId',...
There should be a way for Lambda API to process requests that bypass API Gateway and are invoked directly. Support for “RequestResponse” and “Event” invocations should be supported.