About 11,400,000 results
Open links in new tab
  1. How to log request and response body with Retrofit-Android?

    Retrofit 2.0 : UPDATE: @by Marcus Pöhls Logging In Retrofit 2 Retrofit 2 completely relies on OkHttp for any network operation. Since OkHttp is a peer dependency of Retrofit 2, you won’t need to add …

  2. java - why use Retrofit when we have OkHttp - Stack Overflow

    Aug 27, 2016 · 48 Retrofit vs. OkHttp The reason is simple: OkHttp is a pure HTTP/SPDY client responsible for any low-level network operation, caching, request and response manipulation, and …

  3. POST Multipart Form Data using Retrofit 2.0 including image

    Jan 2, 2016 · I am wondering what is the proper way to upload an image using Retrofit 2.0? Should I save it to disk first before uploading? P.S.: I have used retrofit for other Multipart request that does …

  4. Retrofit 2: Get JSON from Response body - Stack Overflow

    Dec 5, 2016 · I want to get string json from my api using retrofit 2, I have no problem when using retrofit 1 to get this json but using retrofit 2 returns null for me. This is what my json looks like {"id":1,"

  5. android - Retrofit 2 - Dynamic URL - Stack Overflow

    Sep 14, 2015 · However, in my app, the URL of my webservices are not known at compile time, the app retrieves them in a downloaded file so i'm wondering how i can use Retrofit 2 with full dynamic URL.

  6. Comparison of Android networking libraries: OkHTTP, Retrofit, and ...

    Update: There are plenty of very good changes in Retrofit 2.0.0-beta2 version 1.6 of Retrofit with OkHttp 2.0 is now dependent on Okio to support java.io and java.nio which makes it much easier to access, …

  7. java - How to set timeout in Retrofit library? - Stack Overflow

    Apr 1, 2015 · I am using Retrofit library in my app, and I'd like to set a timeout of 60 seconds. Does Retrofit have some way to do this? I set Retrofit this way: RestAdapter restAdapter = new …

  8. java - Logging with Retrofit 2 - Stack Overflow

    Sep 11, 2015 · In Retrofit 2 you should use HttpLoggingInterceptor. Add dependency to build.gradle. The latest version as of May 2023 is: implementation 'com.squareup.okhttp3:logging …

  9. android - Retrofit - Change BaseUrl - Stack Overflow

    Aug 6, 2016 · 9 Build a new Retrofit client instance with the new URL The easiest (but not the most performant) way to change the Retrofit base URL at runtime is to rebuild the retrofit client instance …

  10. java - Using Retrofit in Android - Stack Overflow

    Using Retrofit is quite simple and straightforward. First of all you need to add retrofit to your project, as example with Gradle build sytem. compile 'com.squareup.retrofit:retrofit:1.7.1' | another way you can …