1 回答

TA貢獻(xiàn)1775條經(jīng)驗(yàn) 獲得超11個(gè)贊
您的 api 請(qǐng)求需要查詢參數(shù)而不是請(qǐng)求正文。
像這樣嘗試
要求
@POST("/sales/taken")
Call<ResponseModel> sendData(@QueryMap Map<String, String> queryMap);
api參數(shù)
Map<String, String> queryMap = new HashMap<>();
queryMap.put("key", "value_for_key");
queryMap.put("sales_number", "value_for_sales_number");
queryMap.put("taken[0][id_product]", "value_for_taken[0][id_product]");
queryMap.put("taken[0][qty]", "value_for_taken[0][qty]");
queryMap.put("taken[1][id_product]", "value_for_taken[1][id_product]");
queryMap.put("taken[1][qty]", "value_for_taken[1][qty]");
....
添加回答
舉報(bào)