import requests import json import random import datetime real_data = { "sys_id": "123321", "ab_id": "123321", "ser_id": "", "partition_key": "25", "data_cycle": "20220125", "order_data": [ { "consumer_id": "250", "consumer_project_id": "hj_123321", "consumer_type": "", "consumer_name": "", "consumer_dept": "", "consumer_project": "", "order_time": "2022012501", "is_order": "1", "order_no": "hjtest202201260002", "son_order_no": "hjtest202201260002c" }] } head = {"Content-Type":"application/json; charset=UTF-8", 'Connection': 'close'} url_d = "http://10.222.222.222:30037/ability/syncOrderInfo" json_d = json.dumps(real_data) res_d = requests.post(url=url_d,data=json_d,headers=head)