Retrofit Client And Response With Transfer-encoding: Chunked
I'm working on a Android sample app that get film list from http://www.omdbapi.com/. The REST service is: http://www.omdbapi.com/?s=star&apikey=d497e644 I'm using Retrofit t
Solution 1:
After more investigation:
- I remove the
@Streaming
annotations.. they aren't useful. - Tests that I did was on an emulator on a PC behind a firewall.
OkHttp
had some problem about it many years ago, but now chunked transfer is completely managed.- On the same machine, invoking the same URL in a browser does not present any problems
I finally try on another machine, with a JUnit test and in Android emulator and I had no problem.
At last, I'm sure that code works, so is the environment that I used to develop the app has some problem with transfer-encoding chunked.
Complete source code is available here:
I have to find exactly what is the problem, I'm sure now that it not Retrofit or my client definition or OkHttp.
I hope my experience can help other developers.
Byez
Post a Comment for "Retrofit Client And Response With Transfer-encoding: Chunked"