stanna stanna -4 years ago 172
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??

Answer Source

I think that you need to replace:



Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download