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

Add 'content_type' & 'charset' properties to aiohttp.ClientResponse #1352

Merged
merged 3 commits into from
Oct 31, 2016

Conversation

moden-py
Copy link
Contributor

@moden-py moden-py commented Oct 30, 2016

What do these changes do?

Extends aiohttp.ClientResponse with content_type and charset properties like in aiohttp.web.Request.

Are there changes in behavior for the user?

Backwards compatible, nothing old was changed, added two new properties.

Related issue number

#1349

Checklist

  • I think the code is well written
  • Unit tests for the changes exist
  • Documentation reflects the changes
  • Add yourself to CONTRIBUTORS.txt
    • The format is <Name> <Surname>.
    • Please keep alphabetical order, the file is sorted by names.
  • Add a new entry to CHANGES.rst
    • Choose any open position to avoid merge conflicts with other PRs.
    • Add a link to the issue you are fixing (if any) using #issue_number format at the end of changelog message. Use Pull Request number if there are no issues for PR or PR covers the issue only partially.

@codecov-io
Copy link

codecov-io commented Oct 30, 2016

Current coverage is 98.81% (diff: 100%)

Merging #1352 into master will increase coverage by <.01%

@@             master      #1352   diff @@
==========================================
  Files            29         29          
  Lines          6760       6774    +14   
  Methods           0          0          
  Messages          0          0          
  Branches       1117       1119     +2   
==========================================
+ Hits           6680       6694    +14   
  Misses           36         36          
  Partials         44         44          

Powered by Codecov. Last update 71a22e6...52bd2f0

@asvetlov
Copy link
Member

Just move HeadersMixin into helpers.py and inherit ClientResponse from it.

Change `content_type` property behavior if no Content-Type header.
@moden-py
Copy link
Contributor Author

Implemented.

@asvetlov asvetlov merged commit 9cecc65 into aio-libs:master Oct 31, 2016
@asvetlov
Copy link
Member

Thanks!

@lock
Copy link

lock bot commented Oct 29, 2019

This thread has been automatically locked since there has not been
any recent activity after it was closed. Please open a new issue for
related bugs.

If you feel like there's important points made in this discussion,
please include those exceprts into that new issue.

@lock lock bot added the outdated label Oct 29, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Oct 29, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants