mike27cubes / runscope-guzzle-plugin
This package adds Runscope support to the Guzzle 5.x PHP library.
0.1.0
2015-03-02 22:05 UTC
Requires
- php: >=5.4.0
- guzzlehttp/guzzle: ~5.0
- psr/log: 1.0.0
Requires (Dev)
- monolog/monolog: 1.6.*
- phpspec/phpspec: 2.0.*@dev
- phpunit/phpunit: 4.4.*
- raulfraile/ladybug: ~1.0
This package is not auto-updated.
Last update: 2025-03-01 18:59:54 UTC
README
Guzzle 5.x plugin for Runscope
- Requires a free Runscope account, sign up here
- Automatically create Runscope URLs for your requests
- Automatically create proper
Runscope-Request-Port
header when using ports - Support for authenticated buckets and service regions (see example below)
Install by issuing:
~ composer require mike27cubes/runscope-guzzle-plugin
Usage is as follows:
<?php require __DIR__ . '/../vendor/autoload.php'; use 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/');
Enjoy!