mirror of
https://github.com/httpie/cli.git
synced 2025-02-16 17:40:51 +01:00
Fix prettify if no content type is applied.
This can happen some time e.g some unauthorized responses do not have any content type
This commit is contained in:
parent
b0cebd68a1
commit
686d6c0181
@ -35,6 +35,9 @@ def prettify_http(headers):
|
||||
|
||||
|
||||
def prettify_body(content, content_type):
|
||||
if not content_type:
|
||||
return content
|
||||
|
||||
content_type = content_type.split(';')[0]
|
||||
if 'json' in content_type:
|
||||
content_type = TYPE_JS
|
||||
|
Loading…
Reference in New Issue
Block a user