Browse Source

Decode non-JSON HTTP responses when possible

This doesn't affect anything in nilmdb, but is needed by nilmrun.
tags/nilmdb-2.0.2
Jim Paris 3 years ago
parent
commit
85f822e1c4
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      nilmdb/client/httpclient.py

+ 1
- 1
nilmdb/client/httpclient.py View File

@@ -109,7 +109,7 @@ class HTTPClient():
stream=False, headers=headers)
if isjson:
return json.loads(response.content)
return response.content
return response.text

def get(self, url, params=None):
"""Simple GET (parameters in URL)"""


Loading…
Cancel
Save