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

context, vweb: add ability to set and get values on vweb.Context (#18564)

This commit is contained in:
Casper Kuethe
2023-06-27 00:25:45 +02:00
committed by GitHub
parent 7a9c885b31
commit 21d9730cde
6 changed files with 153 additions and 3 deletions

View File

@ -239,6 +239,13 @@ fn test_redirect_middleware() {
assert received.ends_with('302 Found')
}
// Context's
fn test_middleware_with_context() {
x := http.get('http://${localserver}/with-context') or { panic(err) }
assert x.body == 'b'
}
fn testsuite_end() {
// This test is guaranteed to be called last.
// It sends a request to the server to shutdown.