]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
faq/library: remove outdated section (#105996)
authorMathieu Dupuy <deronnax@gmail.com>
Sat, 15 Jul 2023 20:23:10 +0000 (22:23 +0200)
committerGitHub <noreply@github.com>
Sat, 15 Jul 2023 20:23:10 +0000 (13:23 -0700)
Doc/faq/library.rst

index 597caaa778e1c820e8991f4fff78d9730446ccd8..22f7f846d261d8e2a8ea3e7c676bb5471d1c5465 100644 (file)
@@ -669,41 +669,6 @@ and client-side web systems.
 A summary of available frameworks is maintained by Paul Boddie at
 https://wiki.python.org/moin/WebProgramming\ .
 
-Cameron Laird maintains a useful set of pages about Python web technologies at
-https://web.archive.org/web/20210224183619/http://phaseit.net/claird/comp.lang.python/web_python.
-
-
-How can I mimic CGI form submission (METHOD=POST)?
---------------------------------------------------
-
-I would like to retrieve web pages that are the result of POSTing a form. Is
-there existing code that would let me do this easily?
-
-Yes. Here's a simple example that uses :mod:`urllib.request`::
-
-   #!/usr/local/bin/python
-
-   import urllib.request
-
-   # build the query string
-   qs = "First=Josephine&MI=Q&Last=Public"
-
-   # connect and send the server a path
-   req = urllib.request.urlopen('http://www.some-server.out-there'
-                                '/cgi-bin/some-cgi-script', data=qs)
-   with req:
-       msg, hdrs = req.read(), req.info()
-
-Note that in general for percent-encoded POST operations, query strings must be
-quoted using :func:`urllib.parse.urlencode`.  For example, to send
-``name=Guy Steele, Jr.``::
-
-   >>> import urllib.parse
-   >>> urllib.parse.urlencode({'name': 'Guy Steele, Jr.'})
-   'name=Guy+Steele%2C+Jr.'
-
-.. seealso:: :ref:`urllib-howto` for extensive examples.
-
 
 What module should I use to help with generating HTML?
 ------------------------------------------------------