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 | 4ae6f12bb59148f27f88fac30f5935133102c5f9 (patch) | |
| tree | 9d984c80f8f0de526523a320d562f8c3c94748e6 /examples | |
| parent | chore(cargo): republish with --all-features (diff) | |
| download | windmark-4ae6f12bb59148f27f88fac30f5935133102c5f9.tar.xz windmark-4ae6f12bb59148f27f88fac30f5935133102c5f9.zip | |
feat(response): success with mime response
Diffstat (limited to 'examples')
| -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( |