From c01d0ae46a4a3a1d85cab9a49442283718b1fb88 Mon Sep 17 00:00:00 2001 From: Fuwn Date: Sun, 27 Mar 2022 04:16:22 +0000 Subject: feat(response): implement many more responses --- examples/windmark.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'examples/windmark.rs') 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> { 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 } -- cgit v1.2.3