Add logging of JSON requests.

This commit is contained in:
Dorian Pula 2024-02-08 14:55:09 -05:00 committed by Dorian Puła
parent e627581f66
commit 8010008268
1 changed files with 3 additions and 1 deletions

View File

@ -52,7 +52,9 @@ async fn echo_request(
warn!("Received a non-JSON body."); warn!("Received a non-JSON body.");
None None
}, },
Some(Json(value)) => Some(value), Some(Json(value)) => {
info!("JSON request: {}", value.to_string());
Some(value)},
}; };
let response = EchoResponse { let response = EchoResponse {
method, method,