def call(self, action, params=None):
params = params or {}<EOL>params['<STR_LIT:action>'] = action<EOL>resp = self.session.post(self.host, json=params, timeout=self.timeout)<EOL>result = resp.json()<EOL>if '<STR_LIT:error>' in result:<EOL><INDENT>raise RPCException(result['<STR_LIT:error>'])<EOL><DEDENT>return result<EOL>
Makes an RPC call to the server and returns the json response

:param action: RPC method to call
:type action: str

:param params: Dict of arguments to send with RPC call
:type params: dict

:raises: :py:exc:`nano.rpc.RPCException`
:raises: :py:exc:`requests.exceptions.RequestException`

>>> rpc.call(
...     action='account_balance',
...     params={
...         'account': 'xrb_3t6k35gi95xu6tergt6p69ck76ogmitsa8mnijtpxm9fkcm736xtoncuohr3'
...     })
{'balance': '325586539664609129644855132177',
 'pending': '2309370940000000000000000000000000'}