Skip to content

POST request fails with io.Reader reuse in Fiber framework **Description** #6

Description

@francescobianco

POST request fails with io.Reader reuse in Fiber framework

Description
When using Fiber, reusing request body causes empty payload in SDK call.

Code snippet

app.Post("/proxy", func(c *fiber.Ctx) error {
    buf := bytes.NewBuffer(c.Body())

    _, err := apiClient.Request(c.Context(), "POST", baseURL, "/endpoint", buf, nil)
    return err
})

Observed behavior
API receives empty body.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions