PHP code example of mike27cubes / runscope-guzzle-plugin

1. Go to this page and download the library: Download mike27cubes/runscope-guzzle-plugin 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/ */

    

mike27cubes / runscope-guzzle-plugin example snippets



GuzzleHttp\Client;
use Runscope\Plugin\RunscopePlugin;

$client = new Client();

$runscopePlugin = new RunscopePlugin('bucket_key');

// authenticated bucket
// $runscopePlugin = new RunscopePlugin('bucket_key', 'authTokenHere');

// service region
// $runscopePlugin = new RunscopePlugin('bucket_key', null, 'eu1.runscope.net');

$client->getEmitter()->attach($runscopePlugin);

// Send the request and get the response
$response = $client->get('https://api.github.com/');