Jan 132015

Big fan of Retrofit, but have a staging server that has an invalid SSL cert?

Fear not! Just use the AllCertsValidClient!


Example usage:

Gson gson = new GsonBuilder()
AllCertsValidClient client = new AllCertsValidClient();
RestAdapter restAdapter = new RestAdapter.Builder()
    .setConverter(new GsonConverter(gson))
service = restAdapter.create(MyApiService.class);

Have fun, and be safe! (don’t use this thing in production environments!)