I am parsing data using Retrofit. As I used to give BASE URL and END POINTS to Retrofit Request, I don't know how to give IP ADDRESS as BASE URL.
I want to use URL like : http://xxx.xxx.xx.xxx:xxxx/
Is there any suggestion how do I set my BASE URL and END POINT?
What I am using as below with retrofit 2.
URL_BASE = http://192.168.1.11:8080
Retrofit retrofit = new Retrofit.Builder()
.client(httpClient)
.baseUrl(URL_BASE + "/")
.addConverterFactory(GsonConverterFactory.create())
.build();
End Point : http://192.168.1.11:8080/users
@GET("users")
Call<Response> getUser();
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With