Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Preserve body on certain params parsing #77

Closed
vladfaust opened this issue May 17, 2019 · 0 comments
Closed

Preserve body on certain params parsing #77

vladfaust opened this issue May 17, 2019 · 0 comments
Milestone

Comments

@vladfaust
Copy link
Member

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.

@vladfaust vladfaust added this to the 0.8.1 milestone May 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant