PHP code example of cythral / reqc

1. Go to this page and download the library: Download cythral/reqc library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

cythral / reqc example snippets


$request = new reqc\HTTP\Request($options);
var_dump($request->response);

$es = new reqc\EventStream\Server();

$es->send("testEventName", "hello world"); // named event
$es->send(1, "hello world"); // event with an id
$es->send(null, "hello world"); // event without a name or id
$es->send("test", [ "foo" => "bar" ]); // event with json data