1.传输数据
data = {"update_state": param_data,"time":now_time,"ciphertext":ciphertext}
2.添加Header头文件
headers = {"Content-Type": "application/json"}
3. JSON 请求
response = requests.post(url=url,headers=headers , json=data)
4. Python Api 接口
@http.route('/erp/customer_service', methods=['POST'], auth='none', cors='*', type='json')
def customer_service_for_erp(self, service_ids='', *args, **kw):
RequestData = request.jsonrequest
time=RequestData.get('time')
service_ids =RequestData.get('service_ids')
ciphertext = RequestData.get('ciphertext')
ResultDes3 = Des3Class.encrypt_3des(time)