hunnuxiaobo edited a comment on issue #2597:
URL: 
https://github.com/apache/incubator-dolphinscheduler/issues/2597#issuecomment-736301700


   I recently came across the same issue in my application, the source code 
shows that only supports simple json format(json with flat structure).
   
   file: 
DolphinScheduler\dolphinscheduler-server\src\main\java\org\apache\dolphinscheduler\server\task\http\HttTask.java
   line: 256
   code:
   
   protected void addRequestParams(RequestBuilder builder,List<HttpProperty> 
httpPropertyList) {
           if(CollectionUtils.isNotEmpty(httpPropertyList)){
               JSONObject jsonParam = new JSONObject();
               for (HttpProperty property: httpPropertyList){
                   if(property.getHttpParametersType() != null){
                       if 
(property.getHttpParametersType().equals(HttpParametersType.PARAMETER)){
                           builder.addParameter(property.getProp(), 
property.getValue());
                       }else 
if(property.getHttpParametersType().equals(HttpParametersType.BODY)){
                           **jsonParam.put(property.getProp(), 
property.getValue());**
                       }
                   }
               }
               StringEntity postingString = new 
StringEntity(jsonParam.toString(), Charsets.UTF_8);
               postingString.setContentEncoding(StandardCharsets.UTF_8.name());
               postingString.setContentType(APPLICATION_JSON);
               builder.setEntity(postingString);
           }
       }
   
   it means you can't post deeply nested json format like {"key1": {"key2": 
"value"}}


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to