Skip to content

Commit

Permalink
【优化】通用HTTP任务(httpJobHandler)优化,任务参数格式调整为json格式;示例参数如下:
Browse files Browse the repository at this point in the history
  • Loading branch information
xuxueli committed Jan 18, 2025
1 parent 4af1847 commit d8176ba
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -174,12 +174,13 @@ public void httpJobHandler() throws Exception {
XxlJobHelper.handleFail();
return;
}
if (method==null || !Arrays.asList("GET", "POST").contains(method)) {
if (method==null || !Arrays.asList("GET", "POST").contains(method.toUpperCase())) {
XxlJobHelper.log("method["+ method +"] invalid.");

XxlJobHelper.handleFail();
return;
}
method = method.toUpperCase();
boolean isPostMethod = method.equals("POST");

// request
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -176,12 +176,13 @@ public void httpJobHandler() throws Exception {
XxlJobHelper.handleFail();
return;
}
if (method==null || !Arrays.asList("GET", "POST").contains(method)) {
if (method==null || !Arrays.asList("GET", "POST").contains(method.toUpperCase())) {
XxlJobHelper.log("method["+ method +"] invalid.");

XxlJobHelper.handleFail();
return;
}
method = method.toUpperCase();
boolean isPostMethod = method.equals("POST");

// request
Expand Down

0 comments on commit d8176ba

Please sign in to comment.