demo_b.py
700 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# -*- coding: utf-8 -*-
# @Time : 2021/8/6 17:49
# @Author : Ljq
# @File : test_ZCCreate.py
# @Software: PyCharm
"""
整车进门但创建测试
"""
import requests
import xml.etree.ElementTree as ET
url = "http://10.28.1.155:6789"
payload="""
<?xml version="1.0" encoding="GBK"?>
<stream>
<action>DLBALQRY</action>
<userName>11100165758310248856</userName>
<list name="userDataList">
<row>
<accountNo>8113101013600080147</accountNo>
</row>
</list>
</stream>""".encode("gbk")
# print(payload)
headers = {
'Content-Type':'text/xml;charset=GBK'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)