An easy way to mock an API response using Retrofit, OkHttp, and Interceptor

Wahib Ul Haq
4 min readMar 22, 2019

Many times, Android developers need to start implementing features even when the backend is not ready yet. An easier way is to ask the backend developer to create the API service and just send fake content for the sake of it. The underlying notion is that we are not backend developers and it is not our responsibility to provide the endpoint.

--

--

Wahib Ul Haq

Senior Program Manager at Diconium • Dev Advocate • Talks about Tech, DevRel, Soft skills, Careerintech & Partnerships • Co-Organizer @DevRelMunich