fastd / signaller
There is no license information available for the latest version (dev-master) of this package.
dev-master
2018-11-05 04:08 UTC
Requires
- php: >=7.1
- ext-curl: *
- ext-json: *
- fastd/container: ^3.0
- fastd/fastd: ^3.2
- fastd/swoole: ^2.3
- fastd/utils: ^0.2.0
- guzzlehttp/guzzle: ^6.2
Requires (Dev)
- phpunit/phpunit: ^5.0
This package is not auto-updated.
Last update: 2024-12-20 13:14:56 UTC
README
example
require __DIR__ . '/vendor/autoload.php'; use FastD\Signaller\Sentinel; use FastD\Signaller\Service; // usage $sdk = signaller()->invoke('demo', 'demo', $parameter, [ 'headers' => [ ], 'body' => '以后' ]); // $options see guzzle request $options $sdk->asyncRequest('demo', 'demo', $parameter, $options); $responses = $sdk->send(); foreach ($responses as $response) { var_dump($response->isSuccessful()); var_dump($response->getBody()); } // Also you can use the simpleInvoke method, It will return the response immediately $response = signaller()->simpleInvoke('demo', 'demo', $parameter, [ 'headers' => [ ], 'body' => '我们以后' ]);