擅长:python、mysql、java
<p><code>requests.post</code>方法中的<code>params</code>参数用于向URL添加GET参数。所以你在做这样的事情:</p>
<pre><code>curl header "Content-Type: text/plain" request POST example.com/rest/items/z12?ON=
</code></pre>
<p>您应该改为使用<code>data</code>参数。在</p>
^{pr2}$
<p>此外,如果给data参数一个字典,它将以“application/x-www-form-urlencoded”的形式发送有效负载。在curl命令中,发送原始字符串作为有效负载。所以我改变了你的例子。在</p>