Until now, I used Retrofit2 to process requests in which JSON came. For this, the singleton converter added GsonConverterFactory . Now it became necessary to download files from the server. Can I adapt an existing client for this? now he is trying to byteArray the incoming byteArray as if it were json , and I want to process it as ResponseBody , while not departing from the possibility of parsing json with the same client.
- Most likely you just need to specify that the method, the requesting file should return the type ResponseBody - YuriySPb ♦
- @YuriySPb Alas, no, he was the one who tried to parse the input data into the response body using the GsonConverterFactory. I had to make my own ConverterFactory and a separate download client, since one client allows you to add only one factory - iamthevoid
|