-
Notifications
You must be signed in to change notification settings - Fork 8
Request Wrappers
Java HTTP Request and Response objects SUCK. Period.
You might agree or disagree with me, but, truth be told, If I had to sign native Java request objects Scribe would be twice as big and therefore twice as hard to change (The easiest line of code to maintain is the one you never have to write in the first place).
First of all, if you really can make the changes and use this objects… why don’t you give them a try? the interface is so much simple than the Java ones, and you might end liking them :)
On the other hand, if you are really stuck with using Java Request and Response objects, you can try one of the Request Wrappers Scribe provides.
Right now the available ones are:
These classes have a single static method called wrap that takes the Java .net or Servlet request and transforms it into a org.scribe.http.Request that you can freely use with the library.
I’m planning to include even more wrappers, but if you are in a hurry, file a ticket or even better, code it and contribute it so everyone else can benefit. And thanks in advance!