sreekumar
sreekumar

Reputation: 2479

Retrofit and TypedInput

From the documentation, The TypedInput and TypedOutput classes exist only to bind a mime type to data. When we have to use the TypedInput in the Request. ?? Why we need this mapping while making the Request

Upvotes: 1

Views: 2581

Answers (1)

Nikola Despotoski
Nikola Despotoski

Reputation: 50578

If you have consistent MIME type for all requests then you shouldn't bother about the TypedInput or TypedOutput. Let's say if you have JSON in and out for your request you should not consider using these. But if you have mixed requests, let's say byte stream, JSON and XML you should provide your own Converter and mapping for different requests.

Upvotes: 1

Related Questions