if you are using Retrofit 2.x, try changing your version of the Retrofit object as shown below:
Retrofit retrofit = new Retrofit.Builder()
.baseUrl("http://myurl.com/")
.build();
perhaps below will help
/ URL- API. / url url .
:
API
public interface UserService {
@POST("/me")
Call<User> me();}
Retrofit baseUrl
Retrofit retrofit = Retrofit.Builder()
.baseUrl("https://your.api.url/v2");
.build();
:
UserService service = retrofit.create(UserService.class);
→ Url https://your.api.url/me (/v2 )
URL- URL- url /.
public interface UserService {
@POST("me")
Call<User>me();
}
URL
Retrofit retrofit = Retrofit.Builder()
.baseUrl("https://your.api.url/v2/");
.build();
UserService service = retrofit.create(UserService.class);
→ URL- https://your.api.url/v2/me