retrofit2 POST json 到 Url 包含“/”和“&”“?”

retrofit2 POST json to Url contain "/" and "&" "?"

我想 post json 变成 url,这个 url 像:http://service.me.com/index.php?r=login/check&DEBUG=0&M=a;

我写 Retrofit retrofit = new Retrofit.Builder() .baseUrl("http://service.me.com/") .addConverterFactory(GsonConverterFactory.create()) .build(); ...... @POST("index.php?r=login/check&DEBUG=0&M=a") Call<ResponseBean> getLogin(@Body SendBean body);

我该怎么办?

尝试这样做:

  @POST("index.php")
  Call<ResponseBean> getLogin(@Body SendBean body,
                        @Query("r") String r,
                        @Query("DEBUG") int DEBUG,
                        @Query("M") String M);