Skip to content

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

@francescobianco

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions