runscope / guzzle-plugin
This package adds Runscope support to the Guzzle PHP library.
This package's canonical repository appears to be gone and the package has been frozen as a result.
Installs: 7 081
Dependents: 0
Suggesters: 0
Security: 0
Stars: 11
Watchers: 15
Forks: 7
Open Issues: 2
Requires
- php: >=5.3.0
- guzzle/guzzle: >=v3.0
- psr/log: 1.0.0
Requires (Dev)
- monolog/monolog: 1.6.*
- phpspec/phpspec: 2.0.*@dev
- raulfraile/ladybug: ~1.0
This package is not auto-updated.
Last update: 2021-01-18 07:42:57 UTC
README
Guzzle 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 runscope/guzzle-plugin
Usage is as follows:
<?php require __DIR__ . '/../vendor/autoload.php'; use Guzzle\Http\Client; use Runscope\Plugin\RunscopePlugin; $client = new Client('https://api.github.com'); $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->addSubscriber($runscopePlugin); // Send the request and get the response $response = $client->get('/')->send();
Enjoy!