diff options
| author | Fuwn <[email protected]> | 2022-07-09 01:41:19 +0000 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2022-07-09 01:41:19 +0000 |
| commit | d806185bdd41cd89159f5ab729710d84bbae2265 (patch) | |
| tree | 9d984c80f8f0de526523a320d562f8c3c94748e6 /examples/windmark.rs | |
| parent | chore(cargo): republish with --all-features (diff) | |
| download | windmark-0.1.19.tar.xz windmark-0.1.19.zip | |
feat(response): success with mime responsev0.1.19
Diffstat (limited to 'examples/windmark.rs')
| -rw-r--r-- | examples/windmark.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/examples/windmark.rs b/examples/windmark.rs index 80b0cba..736eb54 100644 --- a/examples/windmark.rs +++ b/examples/windmark.rs @@ -103,6 +103,12 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> { }), ); router.mount( + "/specific-mime", + Box::new(|_| { + Response::SuccessWithMime("hi".to_string(), "text/plain".to_string()) + }), + ); + router.mount( "/ip", Box::new(|context| { Response::Success( |