如何在 中间件 中提取 request body,并记录到日志中? #960
Answered
by
chrislearn
shenghui0779
asked this question in
Q&A
-
如何在 中间件 中提取 request body,并记录到日志中? |
Beta Was this translation helpful? Give feedback.
Answered by
chrislearn
Oct 25, 2024
Replies: 2 comments 1 reply
-
不是 request payload 方法就能拿到 Request 的 body 内容? |
Beta Was this translation helpful? Give feedback.
0 replies
-
我想的是,拿到body,但是不take;或者take后,再放回去 |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
那你就 take_body 再通过 req.body_mut() 塞回去。