dougmoscrop / serverless-http

Use your existing middleware framework (e.g. Express, Koa) in AWS Lambda 🎉
Other
1.72k stars 166 forks source link

add support for request/response transformation #13

Closed rochdev closed 7 years ago

rochdev commented 7 years ago

closes #11

dougmoscrop commented 7 years ago

Also could add those extra parameters and maintain backwards compatibility.

rochdev commented 7 years ago

You're right, I didn't think about it but it might not make sense to modify the response before it has been touched by the framework.

About the backward compatibility, it would be possible to indeed modify the existing request/response transforms. It would not be 100% backward compatible if anyone is using the new properties attached to the request, but like you said it is highly unlikely.

I will rework it on top of the existing options tomorrow.

rochdev commented 7 years ago

@dougmoscrop You were right it feels much cleaner having simply extended existing options. Let me know if that works.

dougmoscrop commented 7 years ago

Looks great, thanks!