PHP code example of anomalyce / interlocutor

1. Go to this page and download the library: Download anomalyce/interlocutor 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/ */

    

anomalyce / interlocutor example snippets


use Anomalyce\Interlocutor\{ Engines, Interlocutor };

$interlocutor = new Interlocutor(
  new Engines\GuzzleHttp
);

$request = new \Example\Vendor\MyEndpoint('passing-data-here');

$response = $interlocutor->send($request);

print_r($response);

// class MyEndpoint implements \Anomalyce\Interlocutor\Contracts\Endpoint {
//   use \Anomalyce\Interlocutor\Interlocutory;
// }

$request = new \Example\Vendor\MyEndpoint('passing-data-here');

$response = $request->send();

print_r($response);