How to get string response from Retrofit2?
Add Retrofit2 and ScalarsConverterFactory to your Retrofit.Builder. adapterBuilder = new Retrofit.Builder() .addConverterFactory(ScalarsConverterFactory.create()) .addConverterFactory(GsonConverterFactory.create()); To use ScalarsCoverter add following dependency to your build graddle implementation ‘com.squareup.retrofit2:converter-scalars:2.9.0’ implementation ‘com.squareup.retrofit2:retrofit:2.9.0’ //Adding Retrofit2 For API Call use: Call <String> ***** Android Code : .enqueue(new Callback<String>() { @Override public void onResponse(Call<String> call, Response<String> response) { Log.i(“Response”, response.body().toString()); //Toast.makeText() if (response.isSuccessful()){ … Read more