Skip to content

Commit

Permalink
Merge pull request #552 from tianlu-root/master
Browse files Browse the repository at this point in the history
fix:file provider config template bug fix
  • Loading branch information
scottsut authored Jan 5, 2022
2 parents fd5bff9 + 0dfa29f commit 7e978b0
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,12 @@
"CSV"
]
},
{
"name": "path",
"required": true,
"defaultValue": "",
"type": "string"
},
{
"name": "columns",
"defaultValue": "",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,13 +142,12 @@ private HttpRequestParam convert2RequestParam(Map<String, Object> schema) throws
if (parser != null && StringUtils.isNotBlank(parser.toString())) {
parserClass = parser.toString();
}

Class<? extends HttpResponseParser> aClass = (Class<? extends HttpResponseParser>) Class.forName(parserClass);

httpRequestParam.setResponseParser(aClass);

httpRequestParam.setBody(schema.getOrDefault(BODY, "").toString());

Object body = schema.get(BODY);
if (body != null) {
httpRequestParam.setBody(body.toString());
}
httpRequestParam.setQueryParam((Map<String, String>) schema.get(QUERY_PARAM));

httpRequestParam.setHeaders((Map<String, String>) schema.get(HEADER));
Expand Down

0 comments on commit 7e978b0

Please sign in to comment.