mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
vweb: fix parsing of form fields, send with multipart/form-data (by JS fetch)
This commit is contained in:
@ -89,6 +89,11 @@ pub fn (mut app App) json_echo() vweb.Result {
|
||||
return app.ok(app.req.data)
|
||||
}
|
||||
|
||||
['/login'; post]
|
||||
pub fn (mut app App) login_form(username string, password string) vweb.Result {
|
||||
return app.html('username: x${username}x | password: x${password}x')
|
||||
}
|
||||
|
||||
['/form_echo'; post]
|
||||
pub fn (mut app App) form_echo() vweb.Result {
|
||||
app.set_content_type(app.req.header.get(.content_type) or { '' })
|
||||
|
Reference in New Issue
Block a user