commit 7f7d5959ad8b6c18533a2cbe0747a86709c69cfa
parent 9c3cbc7bc0d5bb0217b50b4dc798dd6974f290bd
Author: Joel-Haeberli <haebu@rubigen.ch>
Date: Mon, 3 Jun 2024 11:39:19 +0200
chore: log request bodies
Diffstat:
1 file changed, 2 insertions(+), 0 deletions(-)
diff --git a/c2ec/http-util.go b/c2ec/http-util.go
@@ -94,6 +94,8 @@ func ReadStructFromBody[T any](req *http.Request, codec Codec[T]) (*T, error) {
return nil, err
}
+ LogInfo("http-util", fmt.Sprintf("received body in request:\n%s\n", string(bodyBytes)))
+
return codec.Decode(bytes.NewReader(bodyBytes))
}