rama_astadipati

RetroServer

Jun 28th, 2018
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.64 KB | None | 0 0
  1. package com.hakiki95.appbiodata.api;
  2.  
  3. import retrofit2.Retrofit;
  4. import retrofit2.converter.gson.GsonConverterFactory;
  5.  
  6. /**
  7. * Created by hakiki95 on 4/16/2017.
  8. */
  9.  
  10. public class Retroserver {
  11. private static final String base_url = "http://192.168.2.5/CrudPHPApi/";
  12.  
  13. private static Retrofit retrofit;
  14.  
  15.  
  16. public static Retrofit getClient()
  17. {
  18. if(retrofit == null)
  19. {
  20. retrofit = new Retrofit.Builder()
  21. .baseUrl(base_url)
  22. .addConverterFactory(GsonConverterFactory.create())
  23. .build();
  24. }
  25.  
  26. return retrofit;
  27. }
  28. }
Add Comment
Please, Sign In to add comment