mirror of
https://github.com/honojs/hono.git
synced 2024-11-25 13:19:30 +01:00
Update README
This commit is contained in:
parent
74bab8b795
commit
77a8ce82c8
12
README.md
12
README.md
@ -247,7 +247,7 @@ app.get('/say', (c) => {
|
|||||||
|
|
||||||
### c.json()
|
### c.json()
|
||||||
|
|
||||||
Render text as `Content-Type:application/json`:
|
Render JSON as `Content-Type:application/json`:
|
||||||
|
|
||||||
```js
|
```js
|
||||||
app.get('/api', (c) => {
|
app.get('/api', (c) => {
|
||||||
@ -255,6 +255,16 @@ app.get('/api', (c) => {
|
|||||||
})
|
})
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### c.html()
|
||||||
|
|
||||||
|
Render HTML as `Content-Type:text/html`:
|
||||||
|
|
||||||
|
```js
|
||||||
|
app.get('/api', (c) => {
|
||||||
|
return c.html('<h1>Hello! Hono!</h1>')
|
||||||
|
})
|
||||||
|
```
|
||||||
|
|
||||||
## fire
|
## fire
|
||||||
|
|
||||||
`app.fire()` do:
|
`app.fire()` do:
|
||||||
|
Loading…
Reference in New Issue
Block a user