We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent fc6f20f commit fd98bffCopy full SHA for fd98bff
examples/webserver/myserver.m
@@ -2,14 +2,21 @@ function myserver() % called from C
2
3
switch (webserver.url())
4
case '/'
5
- stllog('hello from /')
+ stllog('in /')
6
webserver.html('home here');
7
case '/bob'
8
%webserver.template('templates/home.html', values);
9
- stllog('bob');
+ stllog('in /bob');
10
+ a = webserver.getarg('a');
11
+ if ~isempty(a)
12
+ stllog('a = %s', cstring(a));
13
+ end
14
webserver.html('<html><body>hello <b>from</b> /bob</body></html>');
15
case '/alice'
16
+ stllog('in /alice')
17
vals.a = 1;
18
vals.b = 2;
19
webserver.template('templates/alice.html', vals);
20
+ case '/duck'
21
+ webserver.file('duck.jpg', 'image/jpeg');
22
end
0 commit comments