How Can I Get Token With Retrofit2?
I have a web service link for token login. But in this link, there is no '/' at the end of link. And android studio make error called baseUrl must end in /. When I put / it don't g
Solution 1:
Use upto this in
Retrofit.Builder builder = new Retrofit.Builder()
.baseUrl("http://website.net/")
.addConverterFactory(GsonConverterFactory.create());
and in the UserClient interface class
public interface UserClient {
@POST("token") Call<User> login(@Body Login login);
}
Post a Comment for "How Can I Get Token With Retrofit2?"