try { JSONObject params = new JSONObject(); params.put("id", repairOrder.getId()); params.put("forwardId", transferReason.getId()); params.put("liableId", repairMaster.staffId); params.put("liableName", repairMaster.staffName); params.put("liablePhone", repairMaster.staffPhone); params.put("operatingSystem", "APP"); params.put("remark", remark); params.put("serviceTypePName", className); params.put("serviceTypePid", classId); params.put("serviceTypeName", subClassName); params.put("serviceTypeId", subClassId); OkHttpUtils.put(AppConfig.REPAIR_N_ORDER_TRANSFER_URL + "/" + repairOrder.getId()) .tag(context) .requestBody(RequestBody.create(MediaType.parse("application/json"), params.toString())) .execute(callback); } catch (JSONException e) { e.printStackTrace(); }
OkHttpUtils put 请求带JSON参数
最新推荐文章于 2024-07-21 21:04:44 发布