title: Service methods cannot return void. retrofit
body: <p>This is my method in Interface. I am calling this function but app crash with this exception:</p>
  
  <blockquote>
    <p>Caused by: java.lang.IllegalArgumentException: Service methods cannot
    return void.
        for method RestInterface.getOtp</p>
  </blockquote>
  
  <pre><code>//post method to get otp for login
  @FormUrlEncoded
  @POST("/store_login")
  void getOtp(@Header("YOUR_APIKEY") String apikey, @Header("YOUR_VERSION") String appversion,
              @Header("YOUR_VERSION") String confiver, @Field("mobile") String number, Callback&lt;Model&gt; cb);
  </code></pre>
  
  <p>And this is the code where I am calling this function</p>
  
  <pre><code>Retrofit retrofit = new Retrofit.Builder()
              .baseUrl(API_URL)
              .build();
  
      RestInterface restApi = retrofit.create(RestInterface.class);
      restApi.getOtp("andapikey", "1.0", "1.0", "45545845454", new Callback&lt;Model&gt;() {
  
          @Override
          public void onResponse(Response&lt;Model&gt; response) {
  
          }
  
          @Override
          public void onFailure(Throwable t) {
  
          }
      });
  </code></pre>