优化webhook通知

This commit is contained in:
zhouhao 2022-12-13 18:02:05 +08:00
parent 4c1de801ac
commit 9975d3ea00
1 changed files with 4 additions and 5 deletions

View File

@ -42,13 +42,12 @@ public class HttpWebHookTemplate extends AbstractTemplate<HttpWebHookTemplate> {
//todo 增加认证类型, oauth2等
public String resolveBody(Values context) {
if (!StringUtils.hasText(body)) {
return body;
}
Map<String, Object> contextVal = renderMap(context.getAllValues());
if (contextAsBody) {
return JSON.toJSONString(context.getAllValues());
return JSON.toJSONString(contextVal);
}
Map<String, Object> contextVal = context.getAllValues();
try {
if (bodyIsJson == null || bodyIsJson) {