samz406 commented on a change in pull request #4877:
URL: 
https://github.com/apache/incubator-dolphinscheduler/pull/4877#discussion_r586131854



##########
File path: 
dolphinscheduler-alert-plugin/dolphinscheduler-alert-http/src/main/java/org/apache/dolphinscheduler/plugin/alert/http/HttpSender.java
##########
@@ -110,17 +114,17 @@ public AlertResult send(String msg) {
     }
 
     private void createHttpRequest(String msg) {
-
         if (REQUEST_TYPE_POST.equals(requestType)) {
             httpRequest = new HttpPost(url);
+            setHeader();
             //POST request add param in request body
             setMsgInRequestBody(msg);

Review comment:
       > Header is required set by user on ui page,I just get header by user 
set.
   > header是用户在界面上必须要配置的,我只是从用户配置的header取的值
   > 
![微信图片_20210301140515.png](https://camo.githubusercontent.com/b92fc909fd6451e7e289b0c73c85fb43b5145a529ba9983bde777db98953ad7f/687474703a2f2f7777312e73696e61696d672e636e2f6c617267652f3030354363326e326c7931676f34646538686831776a33306635306766676d352e6a7067)
   
   The Content-Type in the header is not mandatory, so it is best not to get 
the value from the header. The body parameter must be in JSON format
   header中Content-Type 不是必填项,所以最好不要从header中获取这个值,body 参数必须是json格式的.
   
   




----------------------------------------------------------------
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