使用python实现钉钉群监控报警

import requests

import json

import urlparse

url = 'xxx';

HEADERS = {

"Content-Type": "application/json ;charset=utf-8 "

}

String_textMsg = { \

"msgtype": "text", \

"text": {"content": 'test'}}

String_textMsg = json.dumps(String_textMsg)

res = requests.post(url, data=String_textMsg, headers=HEADERS)

#print(res.text)

你可能感兴趣的:(json,python,curl)