2016-05-10 8 views
0

私はポストjsonのURLにしたい、このURLのように:http://service.me.com/index.php?r=login/check&DEBUG=0&M=a;retrofit2 URLにPOST jsonに "/"と "&" "が含まれていますか?"

私はどのように行うことができます 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);

を書くのか?

答えて

1

は次のようにやってみてください。

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

代わりにクエリでこれを送るの「ログイン/チェック」、この「ログイン%2Fcheck」のようにそれを送ります。それはコード化されています。 –

+0

さて、ありがとう〜 –

関連する問題