| Conditions | 1 |
| Paths | 1 |
| Total Lines | 21 |
| Code Lines | 14 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 57 | public function send($uri, $params = []) |
||
| 58 | { |
||
| 59 | /** @var \GuzzleHttp\Psr7\Response $response */ |
||
| 60 | $response = $this->getClient()->post('/',[ |
||
| 61 | 'auth' => [ |
||
| 62 | $this->config['username'], |
||
| 63 | $this->config['password'], |
||
| 64 | ], |
||
| 65 | 'headers' => [ |
||
| 66 | 'Accept' => 'application/json', |
||
| 67 | 'Content-Type' => 'application/json-rpc', |
||
| 68 | 'WWW-Authenticate' => 'Basic realm="jsonrpc"' |
||
| 69 | ], |
||
| 70 | 'json' => [ |
||
| 71 | 'method' => $uri, |
||
| 72 | 'params' => $params, |
||
| 73 | 'id' => 'phpbitcoin', |
||
| 74 | ], |
||
| 75 | ]); |
||
| 76 | return $response->getBody(); |
||
| 77 | } |
||
| 78 | } |