fernandezpablo85/scribe-java — pull request #388 by nesquena (2013-06-07 06:07:46+00:00)
Title: Allow Extensible HTTP Request Backends

Hi Pablo,

First off, thanks for putting together Scribe, awesome OAuth library. We are using it extensively in our Android development as well as in our Android training curriculum.

We encountered a frustrating limitation, which is that since Scribe doesn't easily allow me to extend the http backend used, we are unable to use scribe along with another excellent library [Android Async HTTP](http://loopj.com/android-async-http/). That async library is an incredibly powerful way to manage async http requests within an application.

Our goal was to make surgical changes to scribe (as little as possible) to allow support for extensible request backends.

Our changes as you can see in this PR center around the concept of a new interface called `OAuthBaseRequest` which is a simple interface that any object can implement in order to be compatible with scribe signing. Then we simply have `OAuthRequest` implement that interface.

All other changes just switch the type in certain signatures from `OAuthRequest` to `OAuthBaseRequest` and make no other changes whatsoever to the existing codebase.

We hope you will pull in this change. We would be happy to contribute a guide to explain how to plug scribe into any HTTP backend available on Android. We have already successfully combined Scribe with [Android Async HTTP](http://loopj.com/android-async-http/) and we love it.

Please give us any feedback. Thanks.