2019-01-04 03:59:05 +00:00
|
|
|
<?php
|
2019-07-03 05:55:06 +00:00
|
|
|
include_once dirname(__DIR__) . '/vendor/autoload.php';
|
2019-01-04 03:59:05 +00:00
|
|
|
|
2019-07-03 05:55:06 +00:00
|
|
|
$client = new \JsonRpc\Client([
|
|
|
|
'app' => 'abc',
|
|
|
|
'client' => [
|
|
|
|
'default' => [
|
|
|
|
'base_uri' => 'http://localhost:8080',
|
|
|
|
]
|
|
|
|
],
|
|
|
|
]);
|
2019-01-04 03:59:05 +00:00
|
|
|
|
2019-07-03 05:55:06 +00:00
|
|
|
$client->endpoint('default');
|
2019-01-04 03:59:05 +00:00
|
|
|
|
2019-07-03 05:55:06 +00:00
|
|
|
try {
|
|
|
|
$res = $client->call('math.subtract', ['12', '23', 500]);
|
|
|
|
} catch (Exception $e) {
|
|
|
|
var_dump($e->getMessage());
|
|
|
|
}
|