这是我的Api.php
$command=$_POST["command"];
if($command=="getUsers"){
getUsers();
}
elseif ($command=="getNews")
{
getNews();
}
我正在使用改造来在我的android应用中显示结果。我需要通过Retropost传递参数Command并同时获取结果。 有什么解决方案?
答案 0 :(得分:1)
从Retrofit网站尝试以下示例:
@FormUrlEncoded
@POST("user/edit")
Call<User> updateUser(@Field("first_name") String first, @Field("last_name") String last);