InfoSmallCodeBinding smallCode = new InfoSmallCodeBinding();
        smallCode.setSmallCode("测试");
        smallCode.setMiddleBoxCode("测试");
        smallCode.setProductCode("0001");
        Gson gson3 = new Gson();

        String url = AppConfig.ApiUrl+"?action=smallcodebindingadd";
        HttpUtils httpUtils = new HttpUtils();
        //Log.d("Http2635", "test: "+gson3.toJson(smallCode));
        RequestParams params = new RequestParams();
        params.setBodyEntity(new StringEntity(gson3.toJson(smallCode),"UTF-8"));
        params.setContentType("application/json");
        httpUtils.send(com.lidroid.xutils.http.client.HttpRequest.HttpMethod.POST, url, params, new RequestCallBack<String>() {
                    @Override
                    public void onSuccess(ResponseInfo<String> responseInfo) {
                        Log.d("Http2635", "onSuccess: "+responseInfo.result.toString());
                    }

                    @Override
                    public void onFailure(HttpException e, String s) {
                        Log.d("Http2635", "onFailure: "+e.toString());
                    }
                }
        );

 

相关文章:

  • 2021-10-24
  • 2022-12-23
  • 2022-12-23
  • 2021-10-11
  • 2022-12-23
  • 2022-12-23
  • 2022-03-06
  • 2022-12-23
猜你喜欢
  • 2021-09-16
  • 2022-12-23
  • 2022-12-23
  • 2021-09-13
  • 2021-12-12
  • 2021-07-28
  • 2021-08-09
相关资源
相似解决方案