I am facing a dilemma here. Earlier I used to use Core
Java Library HttpUrlConnection to get JSON data over the web and use to parse it with GSON. Earlier these days my university teacher told me to use Retrofit library instead. Thinking of it a better and optimized way to code, I started working with it.
I loved its simplicity and rich feature but here I am struggling a lot due to of Callback anonymous inner class. Due to of it I am unable to pass the objects to other methods of mail application files, which I used to handle easily when I worked with HttpUrlConnection. Now here is my question, am I going any wrong, or is it really not a wise decision to use Retrofit with my java applications and I should stick to HttpUrlConnection.
Please let me know!
I am pasting a code below just to explain my point here: