Back to project page PodioPuzzle.
The source code is released under:
Apache License
If you think the Android project PodioPuzzle listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.podio.podiopuzzle.services.Retrofit; //w w w. java2s .c o m import android.preference.PreferenceManager; import com.podio.podiopuzzle.config.AppConfig; import com.podio.podiopuzzle.config.PodioConfig; import com.squareup.okhttp.OkHttpClient; import java.util.concurrent.TimeUnit; import retrofit.RequestInterceptor; import retrofit.RestAdapter; import retrofit.client.OkClient; /** * Created by goman on 10/29/2014. */ public class RetrofitHelper { private OkHttpClient okHttpClient; private Api restService; private RestAdapter restAdapter; public RetrofitHelper() { okHttpClient = new OkHttpClient(); okHttpClient.setConnectTimeout(AppConfig.API_TIMEOUT, TimeUnit.MILLISECONDS); okHttpClient.setReadTimeout(AppConfig.API_CONNECTION_TIMEOUT, TimeUnit.MILLISECONDS); restAdapter = new RestAdapter.Builder().setClient(new OkClient(okHttpClient)).setEndpoint(PodioConfig.API_BASE_URL) .setLogLevel(AppConfig.LOG_LEVEL).build(); restService = restAdapter.create(Api.class); } public Api getService() { return restService; } }