|
Thanks to all who assisted with getting things moving forward cleanly with with OAuth. With your help I was able to get requests with OAuth moving and collectively a number of bugs were fixed.
That said I've discovered the issue that has been preventing the POST operations from working reliably/at all. Currently the entire system utilized SignPost and HTTPUrlConnection. As described on the SignPost website: NOTE: When using HttpURLConnection, you cannot sign POST requests that carry query parameters in the message payload (i.e. requests of type application/x-www-form-urlencoded). This is not a limitation of Signpost per se, but with the way URLConnection works. Server communication with URLConnection is based on data streams, which means that whenever you write something to the connection, it will be sent to the server immediately. This data is not buffered, and there is simply no way for Signpost to inspect that data and include it in a signature. Hence, when you have to sign requests which contain parameters in their body, you have to use an HTTP library like Apache Commons HttpComponents and the respective Signpost module. (This restriction does not apply to requests which send binary data such as documents or files, because that data won't become part of the signature anyway.) |
|
I've fixed this defect in my local repository and will push the fix to github as soon as I figure out git. With this change (which would hilariously become 1.0) it appears that all functions of oauth get/post will be working without any issues. I will also post an example of the get and post request in the update so its cleaner for people to rapidly drop this into their code and use the API.
The downside is that Apache HttpClient is now along for the ride and while its not enormous, its not the tiny plugin it used to be. |
|
FYI:
Would you mind giving a test and maybe even some feedback regarding the implementation. If it's easier fork the project and GitHub and look at the code there.
Hope all is well.
On 6 September 2010 20:23, Gregory Pierce <[hidden email]> wrote:
-- Kind regards, Anthony |
| Powered by Nabble | Edit this page |
