Skip to content

Commit 6d47697

Browse files
committed
Updated README
Signed-off-by: Fábio Batista <[email protected]>
1 parent 6b34553 commit 6d47697

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,8 @@ export class UserController {
246246

247247
#### Using Request and Response objects
248248

249-
You can use framework's request and response objects this way:
249+
You can use framework's request and response objects directly. If you want to handle the response by yourself,
250+
just make sure you return the response object itself from the action.
250251

251252
```typescript
252253
import {Controller, Req, Res, Get} from "routing-controllers";
@@ -256,7 +257,7 @@ export class UserController {
256257
257258
@Get("/users")
258259
getAll(@Req() request: any, @Res() response: any) {
259-
response.send("Hello response!");
260+
return response.send("Hello response!");
260261
}
261262
262263
}
@@ -274,7 +275,7 @@ export class UserController {
274275
275276
@Get("/users")
276277
getAll(@Req() request: Request, @Res() response: Response) {
277-
response.send("Hello response!");
278+
return response.send("Hello response!");
278279
}
279280
280281
}

0 commit comments

Comments
 (0)