title: java.io.EOFException: End of input at line 1 column 1 path $ in Android retrofit
body: <p>I'm using Retrofit to consume a REST API endpoint, and I'm having the following issue.
  I think the something is wrong with data model on TransactionResponse class, but not sure yet.</p>
  
  <blockquote>
    <p>java.io.EOFException: End of input at line 1 column 1 path $ in
    Android retrofit</p>
  </blockquote>
  
  <p>My call request is as follows.</p>
  
  <pre><code> @FormUrlEncoded
  @POST("/ifapi.php")
  Call&lt;TransactionResponse&gt; loadData(@Field("user") TransactionRequest user);
  </code></pre>
  
  <p>TransactionRequest class :</p>
  
  <pre><code>import javax.annotation.Generated;
  
  @Generated("org.jsonschema2pojo")
  
  public class TransactionResponse {
  
      private Settings settings;
      /**
       *
       * @return
       * The settings
       */
  
      public Settings getSettings()
      {
          return settings;
      }
      /**
       *
       * @param settings
       * The settings
       */
  
      public void setSettings(Settings settings)
      {
          this.settings = settings;
      }
  
      private Actions actions;
      /**
       *
       * @return
       * The actions
       */
      public Actions getActions()
      {
          return actions;
      }
      /**
       *
       * @param actions
       * The actions
       */
      public void setActions(Actions actions)
      {
          this.actions = actions;
      }
  }
  </code></pre>
  
  <p>And below is the code where call is actually done.</p>
  
  <pre><code>OkHttpClient httpClient = new OkHttpClient.Builder().build();
  Retrofit retrofit = new Retrofit.Builder().addConverterFactory(GsonConverterFactory.create()).baseUrl( 
  RestAPI.BASE_URL).client(httpClient).build();
  RestAPI service = retrofit.create(RestAPI.class);
  Call&lt;TransactionResponse&gt; meResponse = service.loadData(request);
  
  meResponse.enqueue(new Callback&lt;TransactionResponse&gt;() {
         @Override 
         public void onResponse(Call&lt;TransactionResponse&gt; call, Response&lt;TransactionResponse&gt; response) {
                 if (response.isSuccessful()) {
                         TransactionResponse body = response.body();
                         Actions actions = body.getActions();
                         Map&lt;String, String&gt; params = actions.getParams();
                 }
         }
  
         @Override
         public void onFailure(Call&lt;TransactionResponse&gt; call, Throwable t){
                t.printStackTrace();
         }
    });
  </code></pre>
  
  <p>Can anyone please help me? Thanks in advance.</p>
  
  <p>I'm using the following libraries.</p>
  
  <pre><code>compile 'com.squareup.retrofit2:retrofit:2.2.0'
  compile 'javax.annotation:javax.annotation-api:1.2'
  compile 'com.squareup.retrofit2:converter-gson:2.2.0'
  </code></pre>
  
  <p>P.S I found that the request worked with form data, but not with JSON data.
  <a href="https://i.stack.imgur.com/MhS3w.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/MhS3w.png" alt="enter image description here"></a></p>