1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

vweb: Implement chunked encoding transfer (#8179)

This commit is contained in:
Louis Schmieder
2021-01-18 13:04:21 +01:00
committed by GitHub
parent 5ddb70940e
commit 38881e4b20
4 changed files with 46 additions and 1 deletions

View File

@@ -56,6 +56,11 @@ pub fn (mut app App) html_page() vweb.Result {
return app.html('<h1>ok</h1>')
}
pub fn (mut app App) chunk() vweb.Result {
app.enable_chunked_transfer(20)
return app.html('Lorem ipsum dolor sit amet, consetetur sadipscing')
}
// the following serve custom routes
['/:user/settings']
pub fn (mut app App) settings(username string) vweb.Result {