Retrofit 2 — Access Mapped Objects and Raw Response Payload

Retrofit has the fantastic capability of automatically mapping server responses, no matter if XML, JSON or protocol buffers, to Java objects. This is super convenient for us developers. Of course, if you want, you can always skip the mapping and work with the raw server response.

However, in rare cases it might be necessary to access both — the mapped objects and the raw server response. Because this is actually more difficult than you'd think, we'll spend the next few minutes explaining every step in detail.

Retrofit Series Overview

Continue reading

University Enrollment Required

Future Students benefit from value packed videos and tutorials.

Enroll to receive exclusive content or sign in if you’re already a Future Student.

Enroll me for $15/mo

Explore the Library

Find interesting tutorials and solutions for your problems.