当URL类似于
时,Retrofit会在GET请求中转换POST答案 0 :(得分:1)
Found the solution
@FormUrlEncoded
@POST("index.php")
Call<String> login(@QueryMap(encoded=true) Map<String, String> options,@Field("email") String username,@Field("password") String password);
and calling will be like this
Map<String, String> map = new HashMap<>();
map.put("route","restapi/account/login");
Call<String> call = mAPIService.login(map, email, password);