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

feat: aiohttp request body #527

Merged
merged 4 commits into from
Oct 11, 2019

Conversation

revimi
Copy link
Contributor

@revimi revimi commented Oct 9, 2019

Partially fixes #220
In case if the request body has been read at least once, we have it in the request._read_bytes attribute. It allows us simply access it from non-async code.

@untitaker
Copy link
Member

untitaker commented Oct 10, 2019

@revimi could you add the following:

  • Some test in tests/integrations/aiohttp
  • Some sort of placeholder value for body in case we could not read it, such that a user can distinguish between "there is no body" and "body was not read". I believe this is only a check of request.body_exists

@revimi
Copy link
Contributor Author

revimi commented Oct 10, 2019

@untitaker request.body_exists returns True even if it was GET request without the body. I used request.can_read_body. It returns True if the request has some data in the body but we haven't tried to read it.

@revimi
Copy link
Contributor Author

revimi commented Oct 10, 2019

I'll add tests a bit later

@getsentry getsentry deleted a comment from codecov-io Oct 11, 2019
@untitaker untitaker merged commit 0ace04d into getsentry:master Oct 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

AIOHTTP: Attach request body
2 participants