I'm reading post and docs about Retrofit 1 & 2. I have the next source code to get a repo from an user.
@GET("users/{user}/repos")
Call<List<GithubRepo>> getRepos(@Path("user") String user);
In retrofit2 I see that now we need to change @Path with @Query, but I don't know if the using method is the same. It's like the next one or I need to change something more?
@GET("users/{user}/repos")
Call<List<GithubRepo>> getRepos(@Query("user") String user);
Thank you
both are different @Query is used
when you have to assign some value in
we use like this ....
and @path is used when you change the path or URL or keyword of URL
we use like this ....
NOTE:- @Query always come at end of the URL . And @Path is used anywhere in the URL