尧与钺小兮 發表於 2019-5-29 12:50:00

python接口自动化(四十一)- 发xml格式参数的post请求(超详解)

<h1>简介</h1>
<p>  最近在工作中,遇到一种奇葩的接口,它的参数数据是通过xml,进行传递的,不要大惊小怪的,林子大了什么鸟都有,每个人的思路想法不一样,开发的接口也是各式各样的,如果想要统一的话,必须是提前团队已经做好沟通定好规则,这样就像在产品线上生成一</p>
<p>样规格大小一致。就不会出现前边的问题了,如果出现了怎么办?而且项目进度比较急,没有时间修改,一期上线就只能凑合着用这组接口了,那么作为QA的你,会不会测试,如何用代码、工具实现呢???等等问题跟着就产生了。</p>
<p>  前边就有介绍到有关:post请求相对于get请求多一个body部分,body部分常见的数据类型有以下四种(注意是常见的,并不是只有4种)</p>
<ul>
<li>application/x-www-form-urlencoded</li>
<li>application/json</li>
<li>text/xml</li>
<li>multipart/form-data</li>
</ul>
<p>  本篇就来给各位看官和小伙伴们来讲xml这种类型的body案例,如何用python去实现,由于公司的制度的保密性,所以公司的接口就不能在这里给小伙伴们演示了,我给小伙伴们模拟了一个类似的接口,来给小伙伴们讲解一下思路,希望小伙伴们在遇到的时候不至于</p>
<p>慌了神,不知道从何处入手,其实说到底,说破大天了,它的本质还是一个接口,那就还是按照接口的那套思路往上边靠,这样就思路不至于太偏,也会走很少的弯路。好了就不啰嗦了,直接进入今天的正题吧。</p>
<h1 id="textxml">text/xml的数据类型</h1>
<p>1、首先要确定post请求的body部分类型是xml格式,可以用fiddler抓包工具、postman、jemter、Google浏览器接口调试插件来进行缺洞,这里我是用fiddler抓包工具来确定的。看到body部分格式如下:</p>
<p><img src="https://img2018.cnblogs.com/blog/1232840/201905/1232840-20190529103203555-917537625.png" alt=""></p>
<p>2、body里xml的参数:</p>
<div class="cnblogs_code">
<pre>&lt;?xml version=“<span style="color: rgba(128, 0, 128, 1)">1.0</span>” encoding = “UTF-<span style="color: rgba(128, 0, 128, 1)">8</span>”?&gt;
&lt;COM&gt;
&lt;REQ name=<span style="color: rgba(128, 0, 0, 1)">"</span><span style="color: rgba(128, 0, 0, 1)">北京-宏哥</span><span style="color: rgba(128, 0, 0, 1)">"</span>&gt;
&lt;USER_ID&gt;bjhongge&lt;/USER_ID&gt;
&lt;COMMODITY_ID&gt;<span style="color: rgba(128, 0, 128, 1)">123456</span>&lt;/COMMODITY_ID&gt;
&lt;SESSION_ID&gt;absbnmasbnfmasbm1213&lt;/SESSION_ID&gt;
&lt;/REQ&gt;
&lt;/COM&gt;</pre>
</div>
<h1>模拟接口请求</h1>
<p>  <strong><span style="color: rgba(255, 0, 0, 1)">PS:!!!</span></strong>先不要着急的去用代码实现,而是先用工具请求一次,看是否可以请求是否可以成功。不要一开始就抨击怕啦的敲了半天,运行代码,傻眼了,运行结果和股市一样行情大涨,一片红色。结果你费了半天劲调试代码,也没查出错误。一问开发,开发用工具一试,一脸淫笑,然后笑呵呵的告诉你:额。。。,这个接口有点小问题,我需要调整一下下,这个时候是不是有一种想把开发接口的人痛揍一顿冲动,但是仔细想想还是自己的问题,如果一开始你就用工具模拟一下,出现问题立马找开发人员确认沟通,就不会有后面的剧情了。这种场景一般是萌新、小白可能会遇到的。好了,以下给小伙伴们列举了两种方法,当然了你也可以用其他方法模拟,条条大路通罗马,即可。</p>
<h2>1、Google浏览器接口调试插件模拟</h2>
<p>1、将url、请求方法、参数在插件中填写好,以后直接点击“Send”,即可</p>
<h1><img src="https://img2018.cnblogs.com/blog/1232840/201905/1232840-20190528162904549-347505053.png" alt=""></h1>
<h2 id="使用fiddler模拟">2、使用fiddler模拟</h2>
<p>1、点开fiddler工具上composer菜单</p>
<p>&nbsp;<img src="https://img2018.cnblogs.com/blog/1232840/201905/1232840-20190529111000157-219486083.png" alt=""></p>
<p>2、填写URL、选择请求方法、将xml数据直接复制到右下方Request Body部分,然后点右上角Execute就能执行了</p>
<p><img src="https://img2018.cnblogs.com/blog/1232840/201905/1232840-20190529110827734-469829660.png" alt=""></p>
<h1 id="python实现">python3代码实现</h1>
<p>1、宏哥演示环境:</p>
<p>(1)python37 (2)PyCharm 2018.3.5 x64&nbsp; (3)操作系统win10</p>
<p>2、其实很简单的,难而不会,会而不难。将xml格式的body部分直接写成一个字符串类型就行了,遇到换行的字符串,在后面加个反斜杠</p>
<p><img src="https://img2018.cnblogs.com/blog/1232840/201905/1232840-20190529115030121-1515245717.png" alt=""></p>
<p>3、body参数用data去接收传入,要是遇到编码问题报错,就对body部分encode下再传入</p>
<p><img src="https://img2018.cnblogs.com/blog/1232840/201905/1232840-20190529114810548-1659119572.png" alt=""></p>
<p>4、运行结果</p>
<p><img src="https://img2018.cnblogs.com/blog/1232840/201905/1232840-20190529115116941-117439250.png" alt=""></p>
<p>5、参考代码</p>
<div class="cnblogs_code">
<pre><span style="color: rgba(0, 128, 128, 1)"> 1</span> # coding=utf-<span style="color: rgba(128, 0, 128, 1)">8</span>
<span style="color: rgba(0, 128, 128, 1)"> 2</span> # <span style="color: rgba(128, 0, 128, 1)">1</span>.先设置编码,utf-<span style="color: rgba(0, 0, 0, 1)">8可支持中英文,如上,一般放在第一行
</span><span style="color: rgba(0, 128, 128, 1)"> 3</span>
<span style="color: rgba(0, 128, 128, 1)"> 4</span> # <span style="color: rgba(128, 0, 128, 1)">2</span><span style="color: rgba(0, 0, 0, 1)">.注释:包括记录创建时间,创建人,项目名称。
</span><span style="color: rgba(0, 128, 128, 1)"> 5</span> <span style="color: rgba(128, 0, 0, 1)">'''
</span><span style="color: rgba(0, 128, 128, 1)"> 6</span> Created on <span style="color: rgba(128, 0, 128, 1)">2019</span>-<span style="color: rgba(128, 0, 128, 1)">5</span>-<span style="color: rgba(128, 0, 128, 1)">29</span>
<span style="color: rgba(0, 128, 128, 1)"> 7</span> @author: 北京-宏哥   QQ交流群:<span style="color: rgba(128, 0, 128, 1)">984942724</span>
<span style="color: rgba(0, 128, 128, 1)"> 8</span> <span style="color: rgba(0, 0, 0, 1)">Project:学习和使用 发xml格式参数的post请求
</span><span style="color: rgba(0, 128, 128, 1)"> 9</span> <span style="color: rgba(128, 0, 0, 1)">'''
</span><span style="color: rgba(0, 128, 128, 1)">10</span> # <span style="color: rgba(128, 0, 128, 1)">3</span><span style="color: rgba(0, 0, 0, 1)">.导入模块
</span><span style="color: rgba(0, 128, 128, 1)">11</span> <span style="color: rgba(0, 0, 0, 1)">import requests
</span><span style="color: rgba(0, 128, 128, 1)">12</span> url = <span style="color: rgba(128, 0, 0, 1)">"</span><span style="color: rgba(128, 0, 0, 1)">http://httpbin.org/post</span><span style="color: rgba(128, 0, 0, 1)">"</span>
<span style="color: rgba(0, 128, 128, 1)">13</span>
<span style="color: rgba(0, 128, 128, 1)">14</span> <span style="color: rgba(0, 0, 0, 1)"># python3字符串换行,在右边加个反斜杠
</span><span style="color: rgba(0, 128, 128, 1)">15</span> body = <span style="color: rgba(128, 0, 0, 1)">'</span><span style="color: rgba(128, 0, 0, 1)">&lt;?xml version="1.0" encoding = "UTF-8"?&gt;</span><span style="color: rgba(128, 0, 0, 1)">'</span><span style="color: rgba(0, 0, 0, 1)"> \
</span><span style="color: rgba(0, 128, 128, 1)">16</span>      <span style="color: rgba(128, 0, 0, 1)">'</span><span style="color: rgba(128, 0, 0, 1)">&lt;COM&gt;</span><span style="color: rgba(128, 0, 0, 1)">'</span><span style="color: rgba(0, 0, 0, 1)"> \
</span><span style="color: rgba(0, 128, 128, 1)">17</span>      <span style="color: rgba(128, 0, 0, 1)">'</span><span style="color: rgba(128, 0, 0, 1)">&lt;REQ name="北京-宏哥"&gt;</span><span style="color: rgba(128, 0, 0, 1)">'</span><span style="color: rgba(0, 0, 0, 1)"> \
</span><span style="color: rgba(0, 128, 128, 1)">18</span>      <span style="color: rgba(128, 0, 0, 1)">'</span><span style="color: rgba(128, 0, 0, 1)">&lt;USER_ID&gt;&lt;/USER_ID&gt;</span><span style="color: rgba(128, 0, 0, 1)">'</span><span style="color: rgba(0, 0, 0, 1)"> \
</span><span style="color: rgba(0, 128, 128, 1)">19</span>      <span style="color: rgba(128, 0, 0, 1)">'</span><span style="color: rgba(128, 0, 0, 1)">&lt;COMMODITY_ID&gt;123456&lt;/COMMODITY_ID&gt;</span><span style="color: rgba(128, 0, 0, 1)">'</span><span style="color: rgba(0, 0, 0, 1)"> \
</span><span style="color: rgba(0, 128, 128, 1)">20</span>      <span style="color: rgba(128, 0, 0, 1)">'</span><span style="color: rgba(128, 0, 0, 1)">&lt;SESSION_ID&gt;absbnmasbnfmasbm1213&lt;/SESSION_ID&gt;</span><span style="color: rgba(128, 0, 0, 1)">'</span><span style="color: rgba(0, 0, 0, 1)"> \
</span><span style="color: rgba(0, 128, 128, 1)">21</span>      <span style="color: rgba(128, 0, 0, 1)">'</span><span style="color: rgba(128, 0, 0, 1)">&lt;/REQ&gt;</span><span style="color: rgba(128, 0, 0, 1)">'</span><span style="color: rgba(0, 0, 0, 1)"> \
</span><span style="color: rgba(0, 128, 128, 1)">22</span>      <span style="color: rgba(128, 0, 0, 1)">'</span><span style="color: rgba(128, 0, 0, 1)">&lt;/COM&gt;</span><span style="color: rgba(128, 0, 0, 1)">'</span>
<span style="color: rgba(0, 128, 128, 1)">23</span>
<span style="color: rgba(0, 128, 128, 1)">24</span> <span style="color: rgba(0, 0, 0, 1)"># 遇到编码报错时候,对body进行encode
</span><span style="color: rgba(0, 128, 128, 1)">25</span> r = requests.post(url, data=body.encode(<span style="color: rgba(128, 0, 0, 1)">"</span><span style="color: rgba(128, 0, 0, 1)">utf-8</span><span style="color: rgba(128, 0, 0, 1)">"</span><span style="color: rgba(0, 0, 0, 1)">))
</span><span style="color: rgba(0, 128, 128, 1)">26</span> print(r.text)</pre>
</div>
<h1>从文件中读取XML数据</h1>
<p>1、xml格式的数据写到代码里面,不太直观,后期维护也不方便,可以把xml格式数据单独拿出来写到一个文件里,再用open函数去读取</p>
<p><img src="https://img2018.cnblogs.com/blog/1232840/201905/1232840-20190529113555518-1045039716.png" alt=""></p>
<p>2、新建一个body1_xml文件,写入内容如下</p>
<p><img src="https://img2018.cnblogs.com/blog/1232840/201905/1232840-20190529113715561-117859115.png" alt=""></p>
<p>3、参考内容</p>
<div class="cnblogs_code">
<pre>&lt;?xml version=“<span style="color: rgba(128, 0, 128, 1)">1.0</span>” encoding = “UTF-<span style="color: rgba(128, 0, 128, 1)">8</span>”?&gt;
&lt;COM&gt;
    &lt;REQ name=<span style="color: rgba(128, 0, 0, 1)">"</span><span style="color: rgba(128, 0, 0, 1)">北京-宏哥</span><span style="color: rgba(128, 0, 0, 1)">"</span>&gt;
      &lt;USER_ID&gt;bjhongge&lt;/USER_ID&gt;
      &lt;COMMODITY_ID&gt;<span style="color: rgba(128, 0, 128, 1)">123456</span>&lt;/COMMODITY_ID&gt;
      &lt;SESSION_ID&gt;absbnmasbnfmasbm1213&lt;/SESSION_ID&gt;
    &lt;/REQ&gt;
&lt;/COM&gt;</pre>
</div>
<p>4、用open函数去读xml内容</p>
<p><img src="https://img2018.cnblogs.com/blog/1232840/201905/1232840-20190529113847169-838819342.png" alt=""></p>
<p>5、运行结果</p>
<p><img src="https://img2018.cnblogs.com/blog/1232840/201905/1232840-20190529114236318-1821806204.png" alt=""></p>
<p>6、参考代码</p>
<div class="cnblogs_code">
<pre><span style="color: rgba(0, 128, 128, 1)"> 1</span> # coding=utf-<span style="color: rgba(128, 0, 128, 1)">8</span>
<span style="color: rgba(0, 128, 128, 1)"> 2</span> # <span style="color: rgba(128, 0, 128, 1)">1</span>.先设置编码,utf-<span style="color: rgba(0, 0, 0, 1)">8可支持中英文,如上,一般放在第一行
</span><span style="color: rgba(0, 128, 128, 1)"> 3</span>
<span style="color: rgba(0, 128, 128, 1)"> 4</span> # <span style="color: rgba(128, 0, 128, 1)">2</span><span style="color: rgba(0, 0, 0, 1)">.注释:包括记录创建时间,创建人,项目名称。
</span><span style="color: rgba(0, 128, 128, 1)"> 5</span> <span style="color: rgba(128, 0, 0, 1)">'''
</span><span style="color: rgba(0, 128, 128, 1)"> 6</span> Created on <span style="color: rgba(128, 0, 128, 1)">2019</span>-<span style="color: rgba(128, 0, 128, 1)">5</span>-<span style="color: rgba(128, 0, 128, 1)">29</span>
<span style="color: rgba(0, 128, 128, 1)"> 7</span> @author: 北京-宏哥   QQ交流群:<span style="color: rgba(128, 0, 128, 1)">984942724</span>
<span style="color: rgba(0, 128, 128, 1)"> 8</span> <span style="color: rgba(0, 0, 0, 1)">Project:学习和使用 发xml格式参数的post请求
</span><span style="color: rgba(0, 128, 128, 1)"> 9</span> <span style="color: rgba(128, 0, 0, 1)">'''
</span><span style="color: rgba(0, 128, 128, 1)">10</span> # <span style="color: rgba(128, 0, 128, 1)">3</span><span style="color: rgba(0, 0, 0, 1)">.导入模块
</span><span style="color: rgba(0, 128, 128, 1)">11</span> <span style="color: rgba(0, 0, 0, 1)">import requests
</span><span style="color: rgba(0, 128, 128, 1)">12</span> url = <span style="color: rgba(128, 0, 0, 1)">"</span><span style="color: rgba(128, 0, 0, 1)">http://httpbin.org/post</span><span style="color: rgba(128, 0, 0, 1)">"</span>
<span style="color: rgba(0, 128, 128, 1)">13</span>
<span style="color: rgba(0, 128, 128, 1)">14</span> <span style="color: rgba(0, 0, 0, 1)"># python3字符串换行,在右边加个反斜杠
</span><span style="color: rgba(0, 128, 128, 1)">15</span> body = <span style="color: rgba(128, 0, 0, 1)">'</span><span style="color: rgba(128, 0, 0, 1)">&lt;?xml version="1.0" encoding = "UTF-8"?&gt;</span><span style="color: rgba(128, 0, 0, 1)">'</span><span style="color: rgba(0, 0, 0, 1)"> \
</span><span style="color: rgba(0, 128, 128, 1)">16</span>      <span style="color: rgba(128, 0, 0, 1)">'</span><span style="color: rgba(128, 0, 0, 1)">&lt;COM&gt;</span><span style="color: rgba(128, 0, 0, 1)">'</span><span style="color: rgba(0, 0, 0, 1)"> \
</span><span style="color: rgba(0, 128, 128, 1)">17</span>      <span style="color: rgba(128, 0, 0, 1)">'</span><span style="color: rgba(128, 0, 0, 1)">&lt;REQ name="北京-宏哥"&gt;</span><span style="color: rgba(128, 0, 0, 1)">'</span><span style="color: rgba(0, 0, 0, 1)"> \
</span><span style="color: rgba(0, 128, 128, 1)">18</span>      <span style="color: rgba(128, 0, 0, 1)">'</span><span style="color: rgba(128, 0, 0, 1)">&lt;USER_ID&gt;&lt;/USER_ID&gt;</span><span style="color: rgba(128, 0, 0, 1)">'</span><span style="color: rgba(0, 0, 0, 1)"> \
</span><span style="color: rgba(0, 128, 128, 1)">19</span>      <span style="color: rgba(128, 0, 0, 1)">'</span><span style="color: rgba(128, 0, 0, 1)">&lt;COMMODITY_ID&gt;123456&lt;/COMMODITY_ID&gt;</span><span style="color: rgba(128, 0, 0, 1)">'</span><span style="color: rgba(0, 0, 0, 1)"> \
</span><span style="color: rgba(0, 128, 128, 1)">20</span>      <span style="color: rgba(128, 0, 0, 1)">'</span><span style="color: rgba(128, 0, 0, 1)">&lt;SESSION_ID&gt;absbnmasbnfmasbm1213&lt;/SESSION_ID&gt;</span><span style="color: rgba(128, 0, 0, 1)">'</span><span style="color: rgba(0, 0, 0, 1)"> \
</span><span style="color: rgba(0, 128, 128, 1)">21</span>      <span style="color: rgba(128, 0, 0, 1)">'</span><span style="color: rgba(128, 0, 0, 1)">&lt;/REQ&gt;</span><span style="color: rgba(128, 0, 0, 1)">'</span><span style="color: rgba(0, 0, 0, 1)"> \
</span><span style="color: rgba(0, 128, 128, 1)">22</span>      <span style="color: rgba(128, 0, 0, 1)">'</span><span style="color: rgba(128, 0, 0, 1)">&lt;/COM&gt;</span><span style="color: rgba(128, 0, 0, 1)">'</span>
<span style="color: rgba(0, 128, 128, 1)">23</span>
<span style="color: rgba(0, 128, 128, 1)">24</span> with open(<span style="color: rgba(128, 0, 0, 1)">'</span><span style="color: rgba(128, 0, 0, 1)">body1.xml</span><span style="color: rgba(128, 0, 0, 1)">'</span>,encoding=<span style="color: rgba(128, 0, 0, 1)">'</span><span style="color: rgba(128, 0, 0, 1)">utf-8</span><span style="color: rgba(128, 0, 0, 1)">'</span>) <span style="color: rgba(0, 0, 255, 1)">as</span><span style="color: rgba(0, 0, 0, 1)"> fp:
</span><span style="color: rgba(0, 128, 128, 1)">25</span>      body =<span style="color: rgba(0, 0, 0, 1)"> fp.read()
</span><span style="color: rgba(0, 128, 128, 1)">26</span> print(body)</pre>
</div>
<h1>小结</h1>
<p>&nbsp;  嘿嘿,今天到这里有<span style="font-size: 18px; color: rgba(255, 0, 0, 1)">关发xml格式参数的post请求</span>就给小伙伴们介绍完了,看起来是不是相当简单啊,但是在工作中遇到类似的问题,要灵活应用,不要生搬硬套。</p>

</div>
<div id="MySignature" role="contentinfo">
    <div id="MySignature" style="display: block">
        <div style="font-size: 13px; border: 1px dashed rgb(45, 161, 45); padding: 10px 15px; background-color: rgb(248, 248, 248)">
                <label style="font-weight: bold">
                        &nbsp;&nbsp;&nbsp;&nbsp;为了方便大家在移动端也能看到我分享的博文,现已注册个人微信公众号,扫描左下方二维码即可,欢迎大家关注,提前解锁更多测试干货!有时间会及时分享相关技术博文。
                </label>
                <br>
                <label style="font-weight: bold">
                        &nbsp;&nbsp;&nbsp;&nbsp;为了方便大家互动讨论相关技术问题,刚刚建立了咱们的专门的微信群交流互动群,群内会分享交流测试领域前沿知识。请您扫描中间的微信二维码进群
                </label>
                <br>
                <label style="font-weight: bold">
                        &nbsp;&nbsp;&nbsp;&nbsp;为了方便大家互动讨论相关技术问题,现已组建专门的微信群,由于微信群满100,请您扫描右下方宏哥个人微信二维码拉你进群
                        <label style="font-weight: bold; color: red; font-size: 15px">
                                (请务必备注:已关注公众号进群)平时上班忙(和你一样),所以加好友不及时,请稍安勿躁~
                        </label>
                        ,欢迎大家加入这个大家庭,我们一起畅游知识的海洋。
                </label>
                <br>
                &nbsp;&nbsp;&nbsp;&nbsp;感谢您花时间阅读此篇文章,如果您觉得这篇文章你学到了东西也是为了犒劳下博主的码字不易不妨打赏一下吧,让博主能喝上一杯咖啡,在此谢过了!
                <br>
                &nbsp;&nbsp;&nbsp;&nbsp;如果您觉得阅读本文对您有帮助,请点一下左下角
               
                        “推荐”
               
                按钮,您的
                <label style="font-weight: bold; color: red; font-size: 15px">
                        “推荐”
                </label>
                将是我最大的写作动力!另外您也可以选择
               
                        【
                        <strong>
                                关注我
                        </strong>
                        】
               
                ,可以很方便找到我!
                <br>
                &nbsp;&nbsp;&nbsp;&nbsp;本文版权归作者和博客园共有,来源网址:
               
                        https://www.cnblogs.com/du-hong
               
                欢迎各位转载,但是未经作者本人同意,转载文章之后必须在文章页面明显位置给出作者和原文连接,否则保留追究法律责任的权利!
        </div>
        <div style="text-align: center; margin-top: 10px">
                <p style=" font-weight: bolder; color: red; ">
                        公众号(关注宏哥)&NonBreakingSpace; &NonBreakingSpace;&NonBreakingSpace;&NonBreakingSpace;
                        &NonBreakingSpace; &NonBreakingSpace; &NonBreakingSpace;&NonBreakingSpace;&NonBreakingSpace;&NonBreakingSpace;
                        &NonBreakingSpace;&NonBreakingSpace;&NonBreakingSpace; &NonBreakingSpace;&NonBreakingSpace;&NonBreakingSpace;
                        &NonBreakingSpace;&NonBreakingSpace;&NonBreakingSpace; &NonBreakingSpace;&NonBreakingSpace;&NonBreakingSpace;
                        微信群(扫码进群) &NonBreakingSpace;&NonBreakingSpace;&NonBreakingSpace;
                        &NonBreakingSpace;&NonBreakingSpace;&NonBreakingSpace; &NonBreakingSpace;&NonBreakingSpace;&NonBreakingSpace;
                        &NonBreakingSpace;&NonBreakingSpace;&NonBreakingSpace; &NonBreakingSpace;&NonBreakingSpace;&NonBreakingSpace;
                        &NonBreakingSpace;&NonBreakingSpace;&NonBreakingSpace;&NonBreakingSpace;
                        &NonBreakingSpace;&NonBreakingSpace;&NonBreakingSpace; &NonBreakingSpace;&NonBreakingSpace;
                        &NonBreakingSpace;&NonBreakingSpace;&NonBreakingSpace; &NonBreakingSpace;&NonBreakingSpace;客服微信
                </p>
                <img style="width: 200px;padding-right: 50px;" alt="个人微信公众号" src="https://img2018.cnblogs.com/common/1741949/201911/1741949-20191119095948011-608816619.png">
                <img style="width: 200px;padding-right: 65px;" alt="微信群" src="https://img2024.cnblogs.com/blog/1232840/202506/1232840-20250610113707419-637869921.png">
                <img style="width: 200px" alt="个人微信" src="https://img2018.cnblogs.com/common/1741949/201911/1741949-20191106101257091-849954564.png">
        </div>
</div><br><br>
来源:https://www.cnblogs.com/du-hong/p/10923930.html
頁: [1]
查看完整版本: python接口自动化(四十一)- 发xml格式参数的post请求(超详解)