|
|
@ -7,6 +7,9 @@ var rpcConfig = require('../config/config')['rpc']; |
|
|
|
|
|
|
|
|
|
|
|
const {username, password, hostname, port} = rpcConfig; |
|
|
|
const {username, password, hostname, port} = rpcConfig; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const keepAliveAgent = new http.Agent({ keepAlive: true }); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
let sync_sql = '', |
|
|
|
let sync_sql = '', |
|
|
|
coolstrs = []; |
|
|
|
coolstrs = []; |
|
|
|
|
|
|
|
|
|
|
@ -18,6 +21,7 @@ function MakeRPCRequest(postData) { |
|
|
|
auth: `${username}:${password}`, |
|
|
|
auth: `${username}:${password}`, |
|
|
|
path: '/', |
|
|
|
path: '/', |
|
|
|
method: 'POST', |
|
|
|
method: 'POST', |
|
|
|
|
|
|
|
agent: keepAliveAgent, |
|
|
|
headers: { |
|
|
|
headers: { |
|
|
|
'Content-Type': 'application/x-www-form-urlencoded', |
|
|
|
'Content-Type': 'application/x-www-form-urlencoded', |
|
|
|
'Content-Length': Buffer.byteLength(postData) |
|
|
|
'Content-Length': Buffer.byteLength(postData) |
|
|
|