Skip to content

How to read the POST body via an io.Reader in Strict Server mode? #2174

@vdobler

Description

@vdobler

It seems as if the "Strict Server" mode has no way to do stream processing on the POST body. Our POST bodies might be very large and loading them completely into a []byte is wasteful (if not outright impossible).

How can a StrictServer be configured to provide the POST body of a request as an io.Reader (only)?

Note that the documentation is not very clear on what the differencens, intended usecaseas, benefits and drawback of the standard vs. the strict server are. Maybe some kind of decission tree on how to decide which one to use would be helpful. Maybe this already answers the original question if one decision point in that tree is "Do you need to consume the POST body of the requets as a stream (io.Reader)? Yes --> StdServer, No/Don'tCare --> Next Decission...."

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