mirror of
https://github.com/httpie/cli.git
synced 2024-11-25 01:03:27 +01:00
parent
22c2cc6465
commit
2a6514eb5d
@ -1214,6 +1214,7 @@ Changelog
|
||||
*You can click a version name to see a diff with the previous one.*
|
||||
|
||||
* `0.8.0-dev`_
|
||||
* Update to Requests 2.0.0
|
||||
* `0.7.0`_ (2013-09-24)
|
||||
* Added ``--ignore-stdin``.
|
||||
* Added support for auth plugins.
|
||||
|
@ -88,16 +88,7 @@ class HTTPMessage(object):
|
||||
@property
|
||||
def content_type(self):
|
||||
"""Return the message content type."""
|
||||
ct = self._orig.headers.get(
|
||||
b'Content-Type',
|
||||
self._orig.headers.get(
|
||||
'Content-Type',
|
||||
''
|
||||
)
|
||||
)
|
||||
if isinstance(ct, bytes):
|
||||
ct = ct.decode()
|
||||
return ct
|
||||
return self._orig.headers.get('Content-Type', '')
|
||||
|
||||
|
||||
class HTTPResponse(HTTPMessage):
|
||||
|
2
setup.py
2
setup.py
@ -11,7 +11,7 @@ if sys.argv[-1] == 'test':
|
||||
|
||||
|
||||
requirements = [
|
||||
'requests>=1.2.3',
|
||||
'requests>=2.0.0',
|
||||
'Pygments>=1.5'
|
||||
]
|
||||
try:
|
||||
|
@ -809,8 +809,6 @@ class RequestBodyFromFilePathTest(BaseTestCase):
|
||||
|
||||
"""
|
||||
def test_request_body_from_file_by_path(self):
|
||||
# FIXME: *sometimes* fails on py33, the content-type is form.
|
||||
# https://github.com/jkbr/httpie/issues/140
|
||||
r = http(
|
||||
'--verbose',
|
||||
'POST',
|
||||
@ -822,8 +820,6 @@ class RequestBodyFromFilePathTest(BaseTestCase):
|
||||
self.assertIn('"Content-Type": "text/plain"', r)
|
||||
|
||||
def test_request_body_from_file_by_path_with_explicit_content_type(self):
|
||||
# FIXME: *sometimes* fails on py33, the content-type is form.
|
||||
# https://github.com/jkbr/httpie/issues/140
|
||||
r = http(
|
||||
'POST',
|
||||
httpbin('/post'),
|
||||
|
Loading…
Reference in New Issue
Block a user