0

I was wondering if its possible to be able to use Retrofit with OkHttp to make a xAuth post call, with the hashed body of the cass as part of the oauth headers.

I have a basic implementation working for get requests, which do not have a body, however the service request fails on post requests which contain a body(where the oauth header which is the hashed body) is being passed through.

Thanks

akshaydashrath
  • 1,025
  • 8
  • 18

1 Answers1

0

Fixed it, basically I used used a combination of URLClient and OkClient to be able to manipulate where I sign my request.

akshaydashrath
  • 1,025
  • 8
  • 18
  • Can you please provide an example how you used Retrofit and Signpost together? Thanks in advance. – Andres Apr 05 '14 at 16:38
  • Sure thing, here you go: https://gist.github.com/akshaydashrath/10119943, let me know if you need anymore help – akshaydashrath Apr 08 '14 at 12:58
  • Thanks @akshaydashrath. Which library do you use to sign OAuth requests? I see in your code "RequestSigner". I am currently using Signpost for OAuth 1.0. Here is what I did to use Retrofit + Signpost. https://github.com/asantibanez/vimofit/blob/master/src/main/java/com/asantibanez/vimofit/clients/SignpostClient.java You instance this client with all your tokens and pass it to a Retrofit RestAdapter. – Andres Apr 09 '14 at 15:36
  • RequestSigner is nothing but some abstraction around signpost :) – akshaydashrath Apr 09 '14 at 15:58