reactphp/react — pull request #143 by rtuin (2013-01-28 21:40:19+00:00)
Title: Introducing a wrapper to the Guzzle oAuth plugin

I was toying around with the React HttpClient, and found that it lacked the support for oAuth.

I would like to hear your thoughts and feedback on this.

Some example code:

```php
createCached('8.8.8.8', $loop);
$client = $httpClientFactory->create($loop, $dnsResolver);

$oauth = new React\HttpClient\Authentication\Oauth(array(
'consumer_key' => '...',
'consumer_secret' => '...',
'token' => '...',
'token_secret' => '...'
));

$request = $client->request('GET', 'https://stream.twitter.com/1.1/statuses/sample.json');
$request->on('response', function($response) {
$response->on('data', function($data) {
echo $data;
});
});
$request->on('writing-headers', array($oauth, 'onWritingHeaders'));
$request->end();
$loop->run();

```