package com.manishkprboilerplate.web_services;

/**
 * Created by edge on 15/2/17.
 */

import retrofit2.Retrofit;
import retrofit2.adapter.rxjava.RxJavaCallAdapterFactory;
import retrofit2.converter.gson.GsonConverterFactory;

public class WebClient {


    private  Retrofit retrofit = null;

    public static WebClient webClient;

    public String BASE_URL                          = "http://webheavens.com/";

    public static synchronized WebClient getInstance(){

        if(webClient==null) {
            webClient = new WebClient();
        }
        return webClient;
    }

    public  Retrofit getClient(String baseUrl) {

        if (retrofit==null) {
            retrofit = new Retrofit.Builder()
                    .baseUrl((baseUrl==null) ? BASE_URL : baseUrl)
                    .addCallAdapterFactory(RxJavaCallAdapterFactory.create())
                    .addConverterFactory(GsonConverterFactory.create())
                    .client(ClientOkHttp.getOKHTTPClient())
                    .build();
        }

        return retrofit;

    }

    public WebClient URL(String url){
        BASE_URL = url;
        return this;
    }


}

@@ -1046,24 +1046,477 @@
  retrofit;%0A%0A
+    %7D%0A    %0A     public  Retrofit getNewClient(String baseUrl) %7B%0A%0A            retrofit = new Retrofit.Builder()%0A                    .baseUrl((baseUrl==null) ? BASE_URL : baseUrl)%0A                    .addCallAdapterFactory(RxJavaCallAdapterFactory.create())%0A                    .addConverterFactory(GsonConverterFactory.create())%0A                    .client(ClientOkHttp.getOKHTTPClient())%0A                    .build();%0A       %0A%0A        return retrofit;%0A%0A
     %7D%0A%0A    p

Update WebClient.java