1
0
mirror of https://github.com/httpie/cli.git synced 2025-08-10 22:42:05 +02:00

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

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