seidelmartin / nest-koa-adapter

Koa Http adapter for Nest.js
MIT License
31 stars 6 forks source link

Allow overwrite HTTP status and headers using NestJS method decorators #1

Closed tomastauer closed 4 years ago

tomastauer commented 4 years ago

NestJS allows HTTP status code and headers to be overwritten using method decorators. The adapter accepts these overwrites, but then change the values by its own logic (e.g. empty body always returns 204).

In this PR, original status code and headers are persisted and applied before sending the request, thus overwriting the adapter own logic for setting status code and some headers.