diff options
author | Toshio Kuratomi <toshio@fedoraproject.org> | 2014-12-16 13:54:23 -0800 |
---|---|---|
committer | James Cammarata <jimi@sngx.net> | 2015-02-17 14:41:13 -0600 |
commit | 2b50d7cf4abb9037de86f7efc40ec7f9b06f76aa (patch) | |
tree | 954879502776b261e2bbcfb52bdef04fd802896c | |
parent | 76e4ca853512d26599c4dff168cea95baaee0a8e (diff) | |
download | ansible-modules-core-2b50d7cf4abb9037de86f7efc40ec7f9b06f76aa.tar.gz |
Add text/json as a mimetype to try deserializing
Fixes #503
-rw-r--r-- | network/basics/uri.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/network/basics/uri.py b/network/basics/uri.py index 95bf5c70..aac724a8 100644 --- a/network/basics/uri.py +++ b/network/basics/uri.py @@ -426,7 +426,8 @@ def main(): uresp[ukey] = value if 'content_type' in uresp: - if uresp['content_type'].startswith('application/json'): + if uresp['content_type'].startswith('application/json') or \ + uresp['content_type'].startswith('text/json'): try: js = json.loads(content) uresp['json'] = js |