From 97884a183f378fd996029cde769df2e974fff1eb Mon Sep 17 00:00:00 2001 From: Fuwn Date: Sun, 27 Mar 2022 06:03:33 +0000 Subject: feat(response): respond with file --- examples/windmark.rs | 3 +++ 1 file changed, 3 insertions(+) (limited to 'examples') diff --git a/examples/windmark.rs b/examples/windmark.rs index ed6bc9f..6ceeaf7 100644 --- a/examples/windmark.rs +++ b/examples/windmark.rs @@ -111,6 +111,9 @@ async fn main() -> Result<(), Box> { .mount("/redirect", |_| { Response::PermanentRedirect("gemini://localhost/test".into()) }) + .mount("/file", |_| { + Response::SuccessFile(include_bytes!("../LICENSE")) + }) .run() .await } -- cgit v1.2.3