httpx
httpx copied to clipboard
Add `content_type` for Response
trafficstars
Summary
I would like to suggest adding a little syntax sugar. It might be more convenient to use response.content_type instead of response.headers.get("Content-Type").
I hope I haven't forgotten any places where changes need to be made
Checklist
- [x] I understand that this PR may be closed in case there was no previous discussion. (This doesn't apply to typos!)
- [x] I've added a test for each change that was introduced, and I tried as much as possible to make a single atomic change.
- [x] I've updated the documentation accordingly.
Hey, @tomchristie , what do you think of this suggestion?
I think this is not needed, but we can see what other maintainers think about it.
what do you think of this suggestion?
I think this is not needed, but we can see what other maintainers think about it.
Indeed. Appreciate the interest tho.