diff --git a/README.md b/README.md index d5c13b1..45d0878 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,8 @@ HTTP Signatures Guzzle 3 === +[![Build Status](https://travis-ci.org/99designs/http-signatures-guzzle.svg)](https://travis-ci.org/99designs/http-signatures-guzzle) + Adds Guzzle 3 support to [99designs/http-signatures][99signatures] Signing with Guzzle 3 @@ -9,8 +11,15 @@ Signing with Guzzle 3 This library includes support for automatically signing Guzzle requests using an event subscriber. ```php +use HttpSignatures\Context; use HttpSignatures\Guzzle\CreateRequestSubscriber; +$context = new Context(array( + 'keys' => array('examplekey' => 'secret-key-here'), + 'algorithm' => 'hmac-sha256', + 'headers' => array('(request-target)', 'Date', 'Accept'), +)); + $client = new \Guzzle\Http\Client('http://example.org'); $client->addSubscriber(new CreateRequestSubscriber($context));