I'm write this code for call  retrofit Synchronous Requests :
public String LOGININTO() throws IOException {
     final String[] message = {""};
     LOGININTERFACE taskService = ServiceGenerator.createService(LOGININTERFACE.class);
     Call<LGOINMODEL> tasks = taskService.savePost("0016642902","0016642902","password");
     LGOINMODEL model=null;
     model=tasks.execute().body();
     return "OK";
}
but when run my code get this error:
at 
Caused by: android.os.NetworkOnMainThreadException retrofit2.ExecutorCallAdapterFactory$ExecutorCallbackCall.execute(ExecutorCallAdapterFactory.java:91)
How can I solve that Problem?
thanks.
 
    