Skip to content
This repository was archived by the owner on Jul 14, 2026. It is now read-only.
This repository was archived by the owner on Jul 14, 2026. It is now read-only.

Feature request: add a way to see requests/response body when debugging client #5273

Closed

Description

@iTrooz

When debugging MinIO behaviour, it would be nice to have a flag, maybe repeating --debug twice, to show HTTP requests/responses body. For example, when doing mcli ls miniotest/test --debug, I would like to see the XML sent by the client/sent back by the server

I can do that using mcli admin trace, which is useful but I need adequate permissions to do that, and it only works with MinIO servers

Activity

  1. toastsandwich commented on Jan 27, 2026

    @toastsandwich
    Contributor

    mc admin trace does the same thing, why add it to other command again ?

  2. klauspost commented on Jan 28, 2026

    @klauspost
    Contributor

    The code doesn't show bodies on successful error codes. That is by design.

    You can fork and change that:

    if resp.StatusCode != http.StatusOK &&
    resp.StatusCode != http.StatusPartialContent &&
    resp.StatusCode != http.StatusNoContent {
    respTrace, err = httputil.DumpResponse(resp, true)
    } else {
    and
    if resp.StatusCode != http.StatusOK &&
    resp.StatusCode != http.StatusPartialContent &&
    resp.StatusCode != http.StatusNoContent {
    respTrace, err = httputil.DumpResponse(resp, true)

  3. iTrooz commented on Jan 28, 2026

    @iTrooz
    Author

    mc admin trace does the same thing, why add it to other command again ?

    mc admin trace needs admin permission on the MinIO servers, which an user may not always have. Plus, this command will show all requests received by the server, no matter the client. I would like to show the body of the specific requests my client makes.

    The code doesn't show bodies on successful error codes. That is by design.

    Got it ! Would you accept a PR to add this behaviour ? I was thinking of specifying --debug twice in order to show the body all the time

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions