mirror of
https://github.com/munin-monitoring/contrib.git
synced 2025-07-22 14:16:00 +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,
|
'params': args,
|
||||||
'id': self.id,
|
'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:
|
if self.service.username:
|
||||||
auth_string = '%s:%s' % (self.service.username, self.service.password)
|
auth_string = '%s:%s' % (self.service.username, self.service.password)
|
||||||
auth_b64 = base64.urlsafe_b64encode(auth_string.encode()).decode()
|
auth_b64 = base64.urlsafe_b64encode(auth_string.encode()).decode()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue