It's possible to send parameters in the body of a PUT request, but it isn't simple: 1. create a subclass of OAuthMessage with a mutable body and parameters. 2. construct an instance of that class with all the required parameters. 3. add a body, something like: new ByteArrayInputStream(OAuth.formEncode(message.getParameters ()).getBytes()) 4. remove the parameters that are now in the body. 5. pass the message to OAuthClient.access or OAuthClient.invoke (OAuthMessage, ParameterStyle).
Shall I change oauth-core to make this easier? I propose that, given a PUT request with ParameterStyle.BODY, it will construct an HttpMessage with Content-Type application/x-www-form-urlencoded, whose body contains all the parameters, including oauth_ parameters and any other application parameters. Will that be satisfactory? Sorry I'm not familiar with the MySpace service provider. On Mar 31, 7:54 am, Ali <[email protected]> wrote: > I've been using the Java OAuth library for quite some time, and I've > encountered situations where when remote applications require PUT with > parameter information in the BODY (as oppose to HEADER or > QUERYSTRING), the OAuth code doesn't work. I did look into the > HttpClient implementation. It seems the PUT method with parameter in > BODY is not supported. I do see there are applications that uses this > type of paradigm, such as updating status to MySpace, and updating > information to other social networks. > > The version of OAuth I'm using is from Oct 27, 2008. I briefly looked > at the latest version of the library, I see there are changes, but not > sure if PUT with BODY is supported. Can anyone verify this? Thank > you! --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "OAuth" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/oauth?hl=en -~----------~----~----~----~------~----~------~--~---
