twisted-post-example.rst (636B)
1 Twisted Example Client: Post Requests 2 ===================================== 3 4 This example is a basic HTTP/2 client written for the `Twisted`_ asynchronous 5 networking framework. 6 7 This client is fairly simple: it makes a hard-coded POST request to 8 nghttp2.org/httpbin/post and prints out the response data, sending a file that is provided 9 on the command line or the script itself. Its purpose is to demonstrate how to 10 write a HTTP/2 client implementation that handles flow control. 11 12 .. literalinclude:: ../../examples/twisted/post_request.py 13 :language: python 14 :linenos: 15 :encoding: utf-8 16 17 18 .. _Twisted: https://twistedmatrix.com/