Skip to content

Latest commit

 

History

History
18 lines (13 loc) · 636 Bytes

File metadata and controls

18 lines (13 loc) · 636 Bytes

Twisted Example Client: Post Requests

This example is a basic HTTP/2 client written for the Twisted asynchronous networking framework.

This client is fairly simple: it makes a hard-coded POST request to nghttp2.org/httpbin/post and prints out the response data, sending a file that is provided on the command line or the script itself. Its purpose is to demonstrate how to write a HTTP/2 client implementation that handles flow control.

.. literalinclude:: ../../examples/twisted/post_request.py
   :language: python
   :linenos:
   :encoding: utf-8