Skip to content

Commit

Permalink
修订一个企业微信某些节点不支持"Expect": "100-continue"的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
owent committed Apr 12, 2019
1 parent 9553d9b commit 25cf5b1
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions tools/qyapi_wx_send_robot.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,8 @@ def SendWXRobotText(url, text, mentioned_list=[], mentioned_mobile_list=[], chat
msg["chatid"] = chat_id

return json.loads(SendHttpRequest(url, post_body=json.dumps(msg, indent=2).encode('utf-8'), headers={
"Content-Type": "application/json; charset=utf-8",
"Expect": "100-continue"
"Content-Type": "application/json; charset=utf-8"#,
#"Expect": "100-continue"
}))

def SendWXRobotMarkdown(url, markdown, chat_id=None):
Expand All @@ -117,8 +117,8 @@ def SendWXRobotMarkdown(url, markdown, chat_id=None):
msg["chatid"] = chat_id

return json.loads(SendHttpRequest(url, post_body=json.dumps(msg, indent=2).encode('utf-8'), headers={
"Content-Type": "application/json; charset=utf-8",
"Expect": "100-continue"
"Content-Type": "application/json; charset=utf-8"#,
#"Expect": "100-continue"
}))

def SendWXRobotImage(url, image_binary, chat_id=None):
Expand All @@ -135,8 +135,8 @@ def SendWXRobotImage(url, image_binary, chat_id=None):
msg["chatid"] = chat_id

return json.loads(SendHttpRequest(url, post_body=json.dumps(msg, indent=2).encode('utf-8'), headers={
"Content-Type": "application/json; charset=utf-8",
"Expect": "100-continue"
"Content-Type": "application/json; charset=utf-8"#,
#"Expect": "100-continue"
}))

def SendWXRobotNews(url, news_list_array, chat_id=None):
Expand Down Expand Up @@ -172,8 +172,8 @@ def SendWXRobotNews(url, news_list_array, chat_id=None):
msg["chatid"] = chat_id

return json.loads(SendHttpRequest(url, post_body=json.dumps(msg, indent=2).encode('utf-8'), headers={
"Content-Type": "application/json; charset=utf-8",
"Expect": "100-continue"
"Content-Type": "application/json; charset=utf-8"#,
#"Expect": "100-continue"
}))

if __name__ == '__main__':
Expand Down

0 comments on commit 25cf5b1

Please sign in to comment.