Replies: 1 comment
-
What do you mean by this? If you want to log the entire request body, that isn't currently possible as Rocket enforces that the request body ( If you're okay with only logging some part of the request body, you can use a fairing along with rocket::build().attach(AdHoc::on_request("Body Logger", |_req, data| Box::pin(async {
log!("{:?}", data.peek(512).await);
}))); |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I tried to find it in docs but nothing helpful was there regarding this particular case. I want to create I simple middleware (fairing) which would print request body parameters if request body exists. How can I do it?
Beta Was this translation helpful? Give feedback.
All reactions