stanna stanna - 5 months ago 55
Android Question

Retrofit changing the url

I have an issue with retrofit. It changes the URL I'm trying to access.

My interface is:

Call<ApiResponse<Movie>> getTopRatedMovies(@Query("api_key") String apiKey);

My client is:

public static final String BASE_URL = "";
private static Retrofit retrofit = null;
public static Retrofit getClient(){
if(retrofit == null){
retrofit = new Retrofit.Builder()
return retrofit;

My issue is that the site I want to retrieve data from is<<your_key>>

but retrofit changes it to<<your_key>>

Any idea on how to fix this??


I think that you need to replace: