timiki / rpc-client
Simple HTTP JSON-RPC client
Installs: 31 749
Dependents: 3
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 0
Requires
- php: >=8.1
- ext-json: *
- guzzlehttp/guzzle: ^6.3|^7.1
- psr/event-dispatcher: ^1.0
- timiki/rpc-common: ^1.0|^2.0
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.8
- phpstan/phpstan: ^1.5
- phpstan/phpstan-symfony: ^1.1
README
Install
composer require timiki/rpc-client
Options
attempts_on_error (int) - Count of attempts on connection or response error (default: 10)
attempts_on_response_error (bool) - Attempt on response error (default: false)
attempts_delay (int) - Delay in msec between attempts (default: 1000)
response_on_connection_exception (bool) - If set true client return JsonResponse on connection exception (default: true)
Async
JSON-RPC Http client use guzzlehttp/promises for call async function
callAsync(string $method, array $params = [], array $headers = []): Promise
noticeAsync(string $method, array $params = [], array $headers = []): Promise