@@ -193,24 +193,26 @@ code generation tooling doesn't support something you need (see also [roadmap](/
193193
194194Eg: response headers are not yet supported.
195195
196- To account for these situations, we pass the raw express ` req ` and ` res ` objects to your handler implementations,
196+ To account for these situations, we pass the raw express ` req ` , ` res ` and ` next ` objects to your handler implementations,
197197allowing you full control where its needed.
198198``` typescript
199- const createTodoList: CreateTodoList = async ({body }, respond , req , res ) => {
199+ const createTodoList: CreateTodoList = async ({body }, respond , req , res , next ) => {
200200 res .setHeader (" x-ratelimit-remaining" , " 100" )
201201 // ...your implementation
202202 return respond .with200 ().body ({ /* ... */ })
203203 }
204204```
205205
206- It's also possible to skip response processing if needed by returning ` ExpressRuntimeResponse.Skip ` from your implementation.
206+ It's also possible to skip response processing if needed by returning ` SkipResponse ` from your implementation.
207207This allows you take complete control of the response.
208208``` typescript
209- const getProfileImage: GetProfileImage = async ({body }, respond , req , res ) => {
209+ import {SkipResponse } from ' @nahkies/typescript-express-runtime/server'
210+
211+ const getProfileImage: GetProfileImage = async ({body }, respond , req , res , next ) => {
210212 res .setHeader (" x-ratelimit-remaining" , " 100" )
211213 res .status (200 ).send (Buffer .from ([/* some binary file*/ ]))
212214
213- return ExpressRuntimeResponse . Skip
215+ return SkipResponse
214216 }
215217```
216218
0 commit comments