Skip to content

Commit

Permalink
feat(ctx): add html method
Browse files Browse the repository at this point in the history
  • Loading branch information
jlenon7 committed Jan 16, 2025
1 parent 5494aa3 commit b9790bd
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions docs/rest-api-application/request-context.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,17 @@ Route.get('/welcome', ({ response }) => {
})
```

#### The `html()` method

Terminate the request rendering an HTML string in the response
body to the client:

```typescript
Route.get('/welcome', ({ response }) => {
response.html('<h1>Hello World!</h1>')
})
```

#### The `view()` method

Terminate the request rendering a view in the response
Expand Down

0 comments on commit b9790bd

Please sign in to comment.