- }else{
- if(uri.endsWith("set_BRMSParamData")){
- connection.setRequestProperty("Content-Type",PolicyController.getContenttype());
- try (OutputStream os = connection.getOutputStream()) {
- IOUtils.copy((InputStream) request.getInputStream(), os);
- }
- }else{
- boundary = "===" + System.currentTimeMillis() + "===";
- connection.setRequestProperty("Content-Type","multipart/form-data; boundary=" + boundary);
- try (OutputStream os = connection.getOutputStream()) {
- if(item != null){
- IOUtils.copy((InputStream) item.getInputStream(), os);
- }
+ } else if (uri.endsWith("set_BRMSParamData")) {
+ connection.setRequestProperty(CONTENT_TYPE, PolicyController.getContenttype());
+ try (OutputStream os = connection.getOutputStream()) {
+ IOUtils.copy(request.getInputStream(), os);
+ }
+ } else {
+ String boundary = "===" + System.currentTimeMillis() + "===";
+ connection.setRequestProperty(CONTENT_TYPE, "multipart/form-data; boundary=" + boundary);
+ try (OutputStream os = connection.getOutputStream()) {
+ if (item != null) {
+ IOUtils.copy(item.getInputStream(), os);