擅长:python、mysql、java
<p>我在Python 3中尝试过这个方法,它看起来很有效(但我手头没有支持<code>PATCH</code>请求类型的服务器):</p>
<pre><code>>>> import http.client
>>> c = http.client.HTTPConnection("www.google.com")
>>> r = c.request("PATCH", "/index.html")
>>> print(r.status, r.reason)
405 Method Not Allowed
</code></pre>
<p>我假设<code>HTTP 405</code>来自服务器,并且它是“不允许的”。</p>
<p>顺便说一下,谢谢你给我看HTTP中的酷<a href="http://tools.ietf.org/html/rfc5789" rel="nofollow">PATCH method</a>。</p>