mirror of
https://github.com/c-cube/tiny_httpd.git
synced 2025-12-06 11:15:35 -05:00
echo: make quit into a button, to perform the POST action properly
This commit is contained in:
parent
16b306c19a
commit
353cee7a5d
1 changed files with 13 additions and 2 deletions
|
|
@ -178,8 +178,19 @@ let () =
|
||||||
li[][pre[][txt "/zcat/:path (GET) to download a file (deflate transfer-encoding)"]];
|
li[][pre[][txt "/zcat/:path (GET) to download a file (deflate transfer-encoding)"]];
|
||||||
li[][pre[][a[A.href "/stats/"][txt"/stats/"]; txt" (GET) to access statistics"]];
|
li[][pre[][a[A.href "/stats/"][txt"/stats/"]; txt" (GET) to access statistics"]];
|
||||||
li[][pre[][a[A.href "/vfs/"][txt"/vfs"]; txt" (GET) to access a VFS embedded in the binary"]];
|
li[][pre[][a[A.href "/vfs/"][txt"/vfs"]; txt" (GET) to access a VFS embedded in the binary"]];
|
||||||
li[][pre[][a[A.href "/quit"][txt "/quit"]; txt" (POST) to quit"]];
|
li[][
|
||||||
li[][pre[][a[A.href "/protected"][txt "/protected"]; txt" (GET) to see a protected page (user:foobar)"]];
|
pre[A.style "display: inline"][
|
||||||
|
a[A.href "/quit"][txt "/quit"]; txt" (POST) to stop server"
|
||||||
|
];
|
||||||
|
form[A.style "display: inline";
|
||||||
|
A.action "/quit"; A.method_ "POST";
|
||||||
|
][
|
||||||
|
button
|
||||||
|
[A.type_ "submit"]
|
||||||
|
[txt"quit"]
|
||||||
|
];
|
||||||
|
];
|
||||||
|
li[][pre[][a[A.href "/protected"][txt "/protected"]; txt" (GET) to see a protected page (login: user, password: foobar)"]];
|
||||||
li[][pre[][a[A.href "/logout"][txt "/logout"]; txt" (POST) to log out"]];
|
li[][pre[][a[A.href "/logout"][txt "/logout"]; txt" (POST) to log out"]];
|
||||||
]
|
]
|
||||||
]
|
]
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue