Pattern Matching and Parameter
app.get('/cookie', ioc((@CookieValue('token') String jwt) {
return jwt;
}));
app.get('/header', ioc((@Header('x-foo') String header) {
return header;
}));
app.get('/query', ioc((@Query('q') String query) {
return query;
}));
app.get('/session', ioc((@Session('foo') String foo) {
return foo;
}));
app.get('/match', ioc((@Query('mode', match: 'pos') String mode) {
return 'YES $mode';
}));
app.get('/match', ioc((@Query('mode', match: 'neg') String mode) {
return 'NO $mode';
}));
app.get('/match', ioc((@Query('mode') String mode) {
return 'DEFAULT $mode';
}));@Header()
@Header()@Query()
@Query()@Session()
@Session()@CookieValue()
@CookieValue()@Parameter()
@Parameter()Last updated