public function request(string $method, ...$params) : ResponseInterface
    {
        try {
            $response = $this->client
                ->post($this->path, $this->makeJson($method, $params));

            if ($response->hasError()) {
                // throw exception on error
                throw new BadRemoteCallException($response);
            }

            return $response;
        } catch (Throwable $exception) {
            throw exception()->handle($exception);
        }
    }
public function request(string $method, ...$params) : ResponseInterface
    {
        try {
            $response = $this->client
                ->post($this->path, $this->makeJson($method, $params));

            if ($response->hasError()) {
                // throw exception on error
                throw new BadRemoteCallException($response);
            }

            return $response;
        } catch (Throwable $exception) {
            throw exception()->handle($exception);
        }
    }
public function request ( string $ method , ... $ params ) : ResponseInterface { try { $ response = $ this -> client -> post ( $ this -> path , $ this -> makeJson ( $ method , $ params ) ) ; if ( $ response -> hasError ( ) ) { // throw exception on error throw new BadRemoteCallException ( $ response ) ; } return $ response ; } catch ( Throwable $ exception ) { throw exception ( ) -> handle ( $ exception ) ; } }
Makes request to Bitcoin Core.

@param string $method
@param mixed  $params

@return \Psr\Http\Message\ResponseInterface
Makes request to Bitcoin Core .