Skip to content

Preserve body on certain params parsing #77

@vladfaust

Description

@vladfaust

The API could look like this:

json require: true, preserve_body: true do
  # ...
end

def call
  context.request.body.gets_to_end # Actual content
end

It would imply copying the body into separate IO, which would, of course, affect the performance. Moreover, it would be impossible to do request body streaming for obvious reason 🤔

Thanks @qszhu for the proposal.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions