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