Even though it is not mandatory to use Retrofit, these are few eye-catchy aspects which make it reliable and handy in the similar use case of yours.
Why use Retrofit?
- Type-safe REST Adapter that makes common networking tasks easy
- For POST operations, retrofit helps in assembling what needed to be submitted. Eg:- Generating URL encoded form.
- Takes care of URL manipulation, requesting, loading, caching, threading, synchronization, sync/async calls
- Helps to generate URL using type-aware generated code tied to specific REST API
- Parsing JSON using GSON
- Retrofit is an API adapter wrapped over OkHttp
Do you want to build a career in Salesforce? Enroll in this Salesforce training course to start your journey!