Skip to content

Instantly share code, notes, and snippets.

View TamimEhsan's full-sized avatar
🏕️
Conquering the world one step at a time

TamimEhsan TamimEhsan

🏕️
Conquering the world one step at a time
View GitHub Profile
@hmasum52
hmasum52 / Api.java
Last active October 29, 2021 15:26
Fastest way to call API endpoints in android using retrofit2
public class Api {
public static Api instance = new Api();
public Endpoints endpoints;
private Api(){
HttpLoggingInterceptor interceptor = new HttpLoggingInterceptor();
interceptor.level(HttpLoggingInterceptor.Level.BODY);
OkHttpClient client = new OkHttpClient.Builder().addInterceptor(interceptor)