Skip to content

Request Body Logging failed #28

Description

@fiurthorn

Logging request body doesn't work for me because the body was already read at the time of logging.
So the body should be read before other handlers can read it.

like:

b, _ := io.ReadAll(r.Body)
r.Body = io.NopCloser(bytes.NewBuffer(b))
...
param := LogFormatterParams{
    Request:     r,
    RequestBody: b,
    isTerm:      isTerm,
}

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Fields

No fields configured for issues without a type.

Projects

Status
In Progress

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions