Rename CreateRequestSubscriber to RequestSubscriber
This commit is contained in:
parent
760d0a7686
commit
78cccf1a8f
|
@ -12,7 +12,7 @@ This library includes support for automatically signing Guzzle requests using an
|
||||||
|
|
||||||
```php
|
```php
|
||||||
use HttpSignatures\Context;
|
use HttpSignatures\Context;
|
||||||
use HttpSignatures\Guzzle\CreateRequestSubscriber;
|
use HttpSignatures\Guzzle\RequestSubscriber;
|
||||||
|
|
||||||
$context = new Context(array(
|
$context = new Context(array(
|
||||||
'keys' => array('examplekey' => 'secret-key-here'),
|
'keys' => array('examplekey' => 'secret-key-here'),
|
||||||
|
@ -21,7 +21,7 @@ $context = new Context(array(
|
||||||
));
|
));
|
||||||
|
|
||||||
$client = new \Guzzle\Http\Client('http://example.org');
|
$client = new \Guzzle\Http\Client('http://example.org');
|
||||||
$client->addSubscriber(new CreateRequestSubscriber($context));
|
$client->addSubscriber(new RequestSubscriber($context));
|
||||||
|
|
||||||
// The below will now send a signed request to: http://example.org/path?query=123
|
// The below will now send a signed request to: http://example.org/path?query=123
|
||||||
$client->get('/path?query=123', array(
|
$client->get('/path?query=123', array(
|
||||||
|
|
|
@ -5,7 +5,7 @@ namespace HttpSignatures\Guzzle;
|
||||||
use Guzzle\Common\Event;
|
use Guzzle\Common\Event;
|
||||||
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
|
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
|
||||||
|
|
||||||
class CreateRequestSubscriber implements EventSubscriberInterface
|
class RequestSubscriber implements EventSubscriberInterface
|
||||||
{
|
{
|
||||||
private $context;
|
private $context;
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
namespace HttpSignatures\Test;
|
namespace HttpSignatures\Test;
|
||||||
|
|
||||||
use HttpSignatures\Guzzle\CreateRequestSubscriber;
|
use HttpSignatures\Guzzle\RequestSubscriber;
|
||||||
use HttpSignatures\Context;
|
use HttpSignatures\Context;
|
||||||
use HttpSignatures\Guzzle\Message;
|
use HttpSignatures\Guzzle\Message;
|
||||||
|
|
||||||
|
@ -17,7 +17,7 @@ class GuzzleSignerTest extends \PHPUnit_Framework_TestCase
|
||||||
));
|
));
|
||||||
|
|
||||||
$this->client = new \Guzzle\Http\Client();
|
$this->client = new \Guzzle\Http\Client();
|
||||||
$this->client->addSubscriber(new CreateRequestSubscriber($this->context));
|
$this->client->addSubscriber(new RequestSubscriber($this->context));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testGuzzleRequestHasExpectedHeaders()
|
public function testGuzzleRequestHasExpectedHeaders()
|
||||||
|
|
Loading…
Reference in New Issue