mirror of
https://github.com/munin-monitoring/contrib.git
synced 2025-07-21 18:41:03 +00:00
Plugin bitcoind_: fix POST request body format
Python3 mandates "bytes" as the request body data type.
This commit is contained in:
parent
920cc492d4
commit
f5de3d19ec
1 changed files with 1 additions and 1 deletions
|
@ -235,7 +235,7 @@ class Proxy(object):
|
|||
'params': args,
|
||||
'id': self.id,
|
||||
}
|
||||
request = urllib.request.Request(self.service.url, json.dumps(data))
|
||||
request = urllib.request.Request(self.service.url, json.dumps(data).encode())
|
||||
if self.service.username:
|
||||
auth_string = '%s:%s' % (self.service.username, self.service.password)
|
||||
auth_b64 = base64.urlsafe_b64encode(auth_string.encode()).decode()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue