diff options
| author | Fuwn <[email protected]> | 2023-03-31 23:55:20 +0000 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2023-03-31 23:55:20 +0000 |
| commit | 687f3778f2fed2fe4aba8027c215ce91c54648ed (patch) | |
| tree | 3358e7db7f4287bcc7bc2e8deeb22e94bfeaffae /examples | |
| parent | fix(cargo): response-macros feature flag (diff) | |
| download | windmark-687f3778f2fed2fe4aba8027c215ce91c54648ed.tar.xz windmark-687f3778f2fed2fe4aba8027c215ce91c54648ed.zip | |
feat(router): expose response to post-route callback
Diffstat (limited to 'examples')
| -rw-r--r-- | examples/windmark.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/examples/windmark.rs b/examples/windmark.rs index 4507048..e5dcd52 100644 --- a/examples/windmark.rs +++ b/examples/windmark.rs @@ -85,7 +85,8 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> { ) })); router.set_post_route_callback(Box::new(|context, content| { - *content = content.replace("Welcome!", "Welcome to Windmark!"); + content.content = + content.content.replace("Welcome!", "Welcome to Windmark!"); info!( "closed connection from {}", |