File: twisted-head-example.rst

package info (click to toggle)
python-h2 4.2.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 3,652 kB
  • sloc: python: 11,141; makefile: 14; sh: 12
file content (17 lines) | stat: -rw-r--r-- 543 bytes parent folder | download | duplicates (28)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
Twisted Example Client: Head 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 HEAD request to
nghttp2.org/httpbin/ and prints out the response data. Its purpose is to demonstrate
how to write a very basic HTTP/2 client implementation.

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


.. _Twisted: https://twistedmatrix.com/