aboutsummaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorFuwn <[email protected]>2022-03-27 04:16:22 +0000
committerFuwn <[email protected]>2022-03-27 04:16:22 +0000
commitc01d0ae46a4a3a1d85cab9a49442283718b1fb88 (patch)
tree2dd7576792a406d8264c39fcaaf5728826102673 /examples
parentrefactor(router): more generic errors (diff)
downloadwindmark-c01d0ae46a4a3a1d85cab9a49442283718b1fb88.tar.xz
windmark-c01d0ae46a4a3a1d85cab9a49442283718b1fb88.zip
feat(response): implement many more responses
Diffstat (limited to 'examples')
-rw-r--r--examples/windmark.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/examples/windmark.rs b/examples/windmark.rs
index a733be2..1cccd70 100644
--- a/examples/windmark.rs
+++ b/examples/windmark.rs
@@ -24,7 +24,7 @@ extern crate log;
use windmark::Response;
#[tokio::main]
-async fn main() -> std::io::Result<()> {
+async fn main() -> Result<(), Box<dyn std::error::Error>> {
windmark::Router::new()
.set_private_key_file("windmark_private.pem")
.set_certificate_chain_file("windmark_pair.pem")
@@ -107,6 +107,7 @@ async fn main() -> std::io::Result<()> {
Response::SensitiveInput("What is your password?".into())
}
})
+ .mount("/error", |_| Response::CertificateNotValid("no".into()))
.run()
.await
}