title: Retrofit - Append text to the end of end point after queries inserted
body: <p>I want to produce the end point like <code>/api/method?page=1.json</code> but the problem is queries will be inserted at the end just like <code>/api/method.json?page=1</code>.</p>
  
  <pre><code>// from my service
  @GET("method.json")
  Call&lt;Void&gt; method(@Query("page") int page);
  
  // building retrofit
  new Retrofit.Builder()
              .baseUrl(URL)
              .client(httpClient)
              .addConverterFactory(GsonConverterFactory.create())
              .build();
  </code></pre>
  
  <p><strong>Update/</strong> Following works but I @Blackbelt answer is the best one.</p>
  
  <pre><code>HttpLoggingInterceptor logging = new HttpLoggingInterceptor();
      logging.setLevel(BuildConfig.DEBUG ? HttpLoggingInterceptor.Level.BASIC : HttpLoggingInterceptor.Level.NONE);
      return new OkHttpClient.Builder()
              .addInterceptor(logging)
              .addInterceptor(new Interceptor() {
                  @Override
                  public Response intercept(Chain chain) throws IOException {
                      Request request = chain.request();
                      request = request.newBuilder().url(request.url().toString().concat(".json")).build();
                      return chain.proceed(request);
                  }
              })
              .build();
  </code></pre>