plain-sockets-example.rst (654B)
1 Plain Sockets Example Client 2 ============================ 3 4 This example is a basic HTTP/2 client written using plain Python `sockets`_, and 5 `ssl`_ TLS/SSL wrapper for socket objects. 6 7 This client is *not* a complete production-ready HTTP/2 client and only intended 8 as a demonstration sample. 9 10 This example shows the bare minimum that is needed to send an HTTP/2 request to 11 a server, and read back a response body. 12 13 .. literalinclude:: ../../examples/plain_sockets/plain_sockets_client.py 14 :language: python 15 :linenos: 16 :encoding: utf-8 17 18 .. _sockets: https://docs.python.org/3/library/socket.html 19 .. _ssl: https://docs.python.org/3/library/ssl.html