Documentation
ref. https://docs.python.org/3/library/urllib.request.html#examples
There are many example in urllib.request
documentation that need to be updated as they no longer works as expected.
In the following example, we are sending a data-stream to the stdin of a CGI and reading the data it returns to us. Note that this example will only work when the Python installation supports SSL.
Use of Basic HTTP Authentication: