Sending the parameters in GET request is quite different you can't append dynamic query to the URL .
Another way of using it.
http://testserver.com/api/login?api=login&value=test
Using retrofit as follows:
Map<String,String> params=new HashMap<String,String>();
params.put("api","login");
params.put("value","test");
@GET("/api/login")
Call<Model> getdata(@QueryMap(encoded = true) Map<String, String> params);
Make sure you use encoded to true.
Happy coding.
0 Comment(s)