vweb: refactor HTTP request parsing (#8874)

This commit is contained in:
Miccah 2021-02-27 16:18:25 -06:00 committed by GitHub
parent 2f9687d29b
commit 7e08e84bc1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 225 additions and 151 deletions

View file

@ -43,3 +43,8 @@ pub fn (mut app App) cookie() vweb.Result {
app.set_cookie(name: 'cookie', value: 'test')
return app.text('Headers: $app.headers')
}
[post]
pub fn (mut app App) post() vweb.Result {
return app.text('Post body: $app.req.data')
}