title: retrofit 2 duplicate request
body: <p>can someone help me? im using retrofit 2 to send data with post method, but i'ts send 3 times.</p>
  
  <p>Here my service generator :</p>
  
  <pre><code>public class ServiceGenerators {
      private static final String TAG = ServiceGenerators.class.getSimpleName();
      //private static HttpLoggingInterceptor loggingInterceptor = new HttpLoggingInterceptor();
  
  
      private static OkHttpClient.Builder httpClient = new OkHttpClient.Builder();
  
      private static Retrofit.Builder builder = new Retrofit.Builder()
              .baseUrl(Constant.API_URL)
              .addConverterFactory(GsonConverterFactory.create());
  
      public static &lt;S&gt; S createService(Class&lt;S&gt; serviceClass) {
          //loggingInterceptor.setLevel(HttpLoggingInterceptor.Level.BODY);/
          httpClient.addInterceptor(new Interceptor() {
              @Override
              public Response intercept(Chain chain) throws IOException {
                  Request original = chain.request();
                  Response response = chain.proceed(original);
  
                  Log.e(TAG, original.url().toString());
  
                  Request.Builder requestBuilder = original.newBuilder()
                          .header("Access-key", "0c3ed6a45e33e047c4e3785cb87aa6b27e651c52")
                          .method(original.method(), original.body());
  
  
                  Request request = requestBuilder.build();
                  return chain.proceed(request);
  
  
              }
          });
          OkHttpClient client = httpClient.build();
          Retrofit retrofit = builder.client(client).build();
          return retrofit.create(serviceClass);
      }
  }
  </code></pre>
  
  <p>Kejadian service</p>
  
  <pre><code>@FormUrlEncoded
      @POST("/api/kejadian")
      Call&lt;Responses&gt; postKejadian(
              @Field("kejadian") String kejadian,
              @Field("w_kejadian") String w_kejadian,
              @Field("lokasi") String lokasi,
              @Field("keterangan") String keterangan,
              @Field("id_user") int id_user
      );
  </code></pre>
  
  <p>here my process:</p>
  
  <pre><code>KejadianService service = ServiceGenerators.createService(KejadianService.class);
          Call&lt;Responses&gt; call = service.postKejadian(kejadian.getText().toString(), tanggal, lokasi.getText().toString(), keterangan.getText().toString(), session.getUID());
  
  
      call.enqueue(new Callback&lt;Responses&gt;() {
          @Override
          public void onResponse(Call&lt;Responses&gt; call, Response&lt;Responses&gt; response) {
              pd.dismiss();
              int code = response.code();
              if (code == 200){
                  Responses responses = response.body();
                  if (responses.error == null) {
                      Constant.showDialog(getApplicationContext(), "Kejadian berhasil dikirim!", new DialogInterface.OnClickListener() {
                          @Override
                          public void onClick(DialogInterface dialog, int which) {
                              finish();
                          }
                      });
                  } else {
                      Snackbar.make(findViewById(R.id.drawer_layout), responses.error, Snackbar.LENGTH_LONG).show();
                  }
                  call.cancel();
              }else if (code == 500){
                  Snackbar.make(findViewById(R.id.drawer_layout), "Error in server", Snackbar.LENGTH_LONG).show();
              }
          }
  
          @Override
          public void onFailure(Call&lt;Responses&gt; call, Throwable t) {
  
          }
      });
  </code></pre>
  
  <p>My log</p>
  
  <blockquote>
    <p>06-26 06:27:39.640 17813-18294/ E/ServiceGenerators: http//myurl/api/kejadian
    06-26 06:27:39.640 17813-18294 I/System: core_booster, getBoosterConfig = false
    06-26 06:27:40.070 17813-18294 E/ServiceGenerators: http//myurl/api/kejadian
    06-26 06:27:40.070 17813-18294 I/System: core_booster, getBoosterConfig = false
    06-26 06:27:40.520 17813-18294 E/ServiceGenerators: http//myurl/api/kejadian
    06-26 06:27:40.520 17813-18294 I/System: core_booster, getBoosterConfig = false</p>
  </blockquote>
  
  <p>i hope you understand what i mean, thanks</p>