-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Allow to overwrite the response Content-Type from options #1134
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
Allow to overwrite the response Content-Type from options #1134
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1134 +/- ##
==========================================
- Coverage 97.28% 97.07% -0.22%
==========================================
Files 67 70 +3
Lines 4235 4405 +170
==========================================
+ Hits 4120 4276 +156
- Misses 115 129 +14
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about --response-as
/ --treat-response-as
?
What would give both options when the charset is set? --response-content-type='application/xml; charset=utf-8' --response-as='application/xml; charset=utf-8' 🤔 I kind of like the |
Yes, charset code & doc have to be done with #1110. |
Co-authored-by: Jakub Roztocil <[email protected]>
It implements the support for custom mime types.
It is a start, it will be used later in #1110 to support custom a charset.
Summary:
$ http --response-as 'appllication/xml' \ https://raw.githubusercontent.com/httpie/httpie/master/tests/fixtures/xmldata/valid/simple_raw.xml