New submission from Evens Fortuné: In the Python Standard Library, at the end of : - Section "20.7.3. Examples" of "20.7. httplib — HTTP protocol client" (for Python 2.7.6) - Section "20.10.3. Examples" of "20.10. http.client — HTTP protocol client" (for Python 3.2.5) - Section "21.12.3. Examples" of "21.12. http.client — HTTP protocol client" (for Python 3.3.5, Python 3.4.0, and Python 3.5a0)
the last example is described this way (change httplib for http.client for Python 3.2+): -------- >>> # This creates an HTTP message >>> # with the content of BODY as the enclosed representation >>> # for the resource http://localhost:8080/foobar ... >>> import httplib >>> BODY = "***filecontents***" >>> conn = httplib.HTTPConnection("localhost", 8080) >>> conn.request("PUT", "/file", BODY) >>> response = conn.getresponse() >>> print response.status, response.reason 200, OK -------- Is it possible that the request method should have been called this way: conn.request("PUT", "/foobar", BODY) ^^^^^^ Thank you ---------- assignee: docs@python components: Documentation messages: 216257 nosy: EvensF, docs@python priority: normal severity: normal status: open title: Path used for HTTP PUT request doesn't match the description type: enhancement versions: Python 2.7, Python 3.2, Python 3.3, Python 3.4, Python 3.5 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue21229> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com