I am using Retrofit2 for API parsing.
While using retrofit1.9.0
both post and get methods work properly. But using retrofit 2.1.0
, in the get method, there is an error:
java.lang.IllegalArgumentException: baseUrl must end in /
I have checked my code and there is no problem, it's working for the post method.
Retrofit retrofit= new Retrofit.Builder()
.baseUrl("sample.com/ecomtest/index.php?route=api/")
.addConverterFactory(GsonConverterFactory.create())
.build();
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…