chore(rpc): use custom Basic auth header

This commit is contained in:
George Lima 2019-06-25 14:01:16 -03:00
parent edf3060d78
commit ee0878a427
1 changed files with 3 additions and 1 deletions

View File

@ -45,7 +45,9 @@ const api: APIMethods = METHODS.reduce(
.post(`http://${RPC.host}:${RPC.port}`, {
method: 'POST',
json: true,
auth: `${RPC.user}:${RPC.password}`,
headers: {
Authorization: `Basic ${Buffer.from(`${RPC.user}:${RPC.password}`).toString('base64')}`,
},
body: {
method,
jsonrpc: '2.0',