post请求方式

1.“content-type”: "application/x-ndjson"
data = ‘’’
{“index”:[“soa-info-fat*”],“ignore_unavailable”:true,“preference”:1616726062657}
{“version”:true,“size”:500,“sort”:[{“logTime”:{“order”:“desc”,“unmapped_type”:“boolean”}}}
‘’’
不要用–> data = ‘\n’.join(json.dumps(d) for d in data3) data3 = [{}, {}],否则请求结果400
response = requests.post(url=url, headers=headers, data=data, timeout=5, verify=False)

你可能感兴趣的:(测试)