Update to requests 2.0.0

Closes #140.
This commit is contained in:
Jakub Roztocil 2013-09-24 21:48:44 +02:00
parent 22c2cc6465
commit 2a6514eb5d
4 changed files with 3 additions and 15 deletions

View File

@ -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.

View File

@ -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):

View File

@ -11,7 +11,7 @@ if sys.argv[-1] == 'test':
requirements = [
'requests>=1.2.3',
'requests>=2.0.0',
'Pygments>=1.5'
]
try:

View File

@ -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'),