#!/user/bin/env python
#coding=utf-8
import json
import requests
string =""
content_json = json.dumps({"content":"llp", "extra":"{ \"flag\": \"14436570\", \"status\": \"\", \"identifier\": \"ios\",\"orientation\": 1}", "user": {"name":"ANICEBOY", "icon":"http://i2.autoimg.cn/userscenter//g25/M03/78/10/120X120_0_q87_autohomecar__wKgHIFr1rLuAfKSVAAVhz9wQZZ8196.jpg",
"id":"76406508" }})
#payload里面为post请求所需要的参数和参数值
payload={'user_Token':'76324617:A187F0F28761C49F3908C6E6B65EF4975C910DBC',
'fromUserId':'76324617',
'conversationType':'chatroom',
'targetId':'7314',
'objectName':'RC:TxtMsg',
'content':content_json
}
print (content_json)
r=requests.post(‘post请求接口’,data=payload)
print (r.text)