python 异步post请求

import aiohttp

 headers = {'User-Agent': 'Dalvik/2.1.0 (Linux; U; Android 6.0.1; Nexus 5 Build/MMB29K) tuhuAndroid 5.24.6',
                   'content-type': 'application/json'}
        async with aiohttp.ClientSession(headers=headers) as sess:
            url = "你的接口"
            data_json = json.dumps({"msg": message_dict})
            async with sess.post(url, data=data_json) as data:
                print(data)

  

上一篇:oracle查看锁表进程,杀掉锁表进程


下一篇:利用Tensorflow训练简单神经网络