Skip to content

Commit fdad8d1

Browse files
authored
Merge pull request #246 from AthennaIO/develop
feat(ctx): add html method
2 parents 6466917 + b9790bd commit fdad8d1

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

docs/rest-api-application/request-context.mdx

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -246,6 +246,17 @@ Route.get('/welcome', ({ response }) => {
246246
})
247247
```
248248

249+
#### The `html()` method
250+
251+
Terminate the request rendering an HTML string in the response
252+
body to the client:
253+
254+
```typescript
255+
Route.get('/welcome', ({ response }) => {
256+
response.html('<h1>Hello World!</h1>')
257+
})
258+
```
259+
249260
#### The `view()` method
250261

251262
Terminate the request rendering a view in the response

docs/rest-api-application/web-application.mdx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,8 +115,7 @@ default value inside the `vite.config.ts` file.
115115

116116
With this option set, SSR will be turn on into your application.
117117
This defines where Vite needs to look when compiling your server
118-
entrypoint files and when searching for the default entrypoint to
119-
render when using `response.render()` method.
118+
entrypoint files.
120119

121120
Default: `src/resources/app/app.tsx`
122121

0 commit comments

Comments
 (0)