Retrofit Android basic and simple issue
My server returns simple Json result like below, {"message":"Upload Success.!"} I am trying to get the result into Retrofit Model class public class MyResponse { @SerializedName("message") String message; } My interface class is here public interface MyService { @Multipart @POST("/") public retrofit2.Call<MyResponse> saveFile(@Part("filename") String fileName, @Part("photo") RequestBody photo); } this is how i try to fetch the result Gson gson = new GsonBuilder() .setLenient() .create(); Retrofit retrofit = new Retrofit.Builder().baseUrl("http://xxxxxxx.com/fileupload.php/")