Is it possible to recieve only String response using Retrofit library? I have a situation where I need to add Query on my link so that link is looking like : localhost//Regi
Try this:
Api interface:
public interface APIService { @GET("api/get_info") Call getInfo();//import okhttp3.ResponseBody; }
Api call:
// Retrofit service creation code skipped here String json = retrofitService().getInfo().execute().body().string();
It worked for me. I use retrofit:2.1.0.