Hi,
I had a good look at your Android library, thanks a lot for making it open source.
I started (and would like to finish) building my own Java library and am currently stuck with the same problems you had on POST. My GET commands work but not my POSTs. I was hoping you could have a quick look and let me know if there is anything obviously wrong with my implementation.
I am basing my library on scribe, which is quite popular for Oauth, may be you tried it?
First I create my oAuthRequest
OAuthRequest oAuthRequest = new OAuthRequest(Verb.POST, serviceURL);
I then add the parameters to the body as json encoded
oAuthRequest.addPayload(parameters.toJSONString());
I set the headers
oAuthRequest.addHeader("Content-Type", "application/json; charset=utf-8");
oAuthRequest.addHeader("Accept", "application/json");
and sign my request
service.signRequest(accessToken, oAuthRequest);
and finally send my request
Response oAuthResponse = oAuthRequest.send();
The response is always 500 Internal Server error.
If I look at the actual message sent,
(1) body content is my json encoded string, eg {"modelId":1773183} for the post cart.
(2) Url is my API endpoint, eg
https://api.shapeways.com/orders/cart/v1
(3) My headers are set for content type and accept and the OAuth Authorisation header is as follows
Authorization=OAuth oauth_signature="UpmlcoxxxxxxxxxxxxjYY%3D", oauth_version="1.0", oauth_nonce="2003439524", oauth_signature_method="HMAC-SHA1", oauth_consumer_key="45bxxxxxxxxxxxxxxxxxxxd58d308", oauth_token="e3aebxxxxxxxxxxxxxxxxxxx03a2af2", oauth_timestamp="1410427574"
Thanks!