title: Why is Retrofit adding a trailing slash to all URLs?
body: <p><strong>Editing question with more details :</strong></p>
  
  <p>I understand the use of service interfaces in Retrofit. I want to make a call to a URL like this :
  <a href="http://a.com/b/c">http://a.com/b/c</a>  (and later append query parameters using a service interface).</p>
  
  <p>My limitations are :</p>
  
  <ol>
  <li><p>I <strong>cannot</strong> use /b/c as a part of service interface (as path parameter). I need it as a part of base url. I have detailed the reason below.</p></li>
  <li><p>I <strong>cannot</strong> afford to have a resultant call being made to <a href="http://a.com/b/c/?key=val">http://a.com/b/c/?key=val</a>. What I need is <a href="http://a.com/b/c?key=val">http://a.com/b/c?key=val</a> (the trailing slash after "c" is creating problems for my API). More details below.</p></li>
  </ol>
  
  <p>My Server API changes pretty frequently, and I am facing trouble on the client side using Retrofit. The main problem is that we cannot have dynamic values (non final) passed to @GET or @POST annotations for Path Parameters (like it is possible for query parameters). For example, even the number of path parameters change when the API changes. We cannot afford to have different interfaces everytime the API changes.</p>
  
  <p>One workaround to this is by forming the complete URLs, that is, an Endpoint with Base_Url + Path_Parameters. </p>
  
  <p>But I am wondering why is Retrofit forcibly adding a trailing slash ("/") to the base url :</p>
  
  <pre><code>        String API_URL = "https://api.github.com/repos/square/retrofit/contributors";
          if (API_URL.endsWith("/")) {
              API_URL = API_URL.substring(0, API_URL.length() - 1);
          }
          System.out.println(API_URL);   //prints without trailing "/"
  
          RestAdapter restAdapter = new RestAdapter.Builder()
          .setEndpoint(API_URL)
          .build();
  </code></pre>
  
  <p>API_URL is always being reset to <a href="https://api.github.com/repos/square/retrofit/contributors/" rel="nofollow">https://api.github.com/repos/square/retrofit/contributors/</a> by Retrofit internally (confirmed this by logging the request)</p>
  
  <p>One workaround to this is by manually adding a "?" in the end to prevent "/" to be added: <a href="https://api.github.com/repos/square/retrofit/contributors" rel="nofollow">https://api.github.com/repos/square/retrofit/contributors</a>?</p>
  
  <p>Unfortunately, such request won't be accepted by our API.</p>
  
  <ol>
  <li>Why is Retrofit forcing this behavior ? </li>
  <li>Is there a solution for people like me who don't want a trailing slash ? </li>
  <li>Can we have variable parameters (non final) being passed to Retrofit @GET or @POST annotations ?</li>
  </ol>