Hello I am trying to upload a file with OAuth and I can“t. I get error
500 or 200, but I am looking for 201 response. I am using this code:
...
params.put("param01", "value01");
aouthRequest = access.newRequestMessage(method, baseUrl,
params.entrySet(), new FileInputStream(file));
aouthRequest.getHeaders().add(new OAuth.Parameter("Content-Length",
String.valueOf(file.length())));
//Validation is ok at this point
aouthRequest.validateMessage(access, new SimpleOAuthValidator());
OAuthMessage rs = client.invoke(aouthRequest,
net.oauth.ParameterStyle.AUTHORIZATION_HEADER);
....
I have checked the oauth_ parameters and they are right. I have also
try to put content type headers and it fails.
Can anyone help me?
Thanks
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---