This repository was archived by the owner on Jan 13, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +45
-0
lines changed
Expand file tree Collapse file tree 2 files changed +45
-0
lines changed Original file line number Diff line number Diff line change 1+ .. _advanced :
2+
3+ Advanced Usage
4+ ==============
5+
6+ This section of the documentation covers more advanced use-cases for ``hyper ``.
7+
8+ Multithreading
9+ --------------
10+
11+ Currently, ``hyper ``'s :class: `HTTP20Connection <hyper.HTTP20Connection> ` class
12+ is **not ** thread-safe. Thread-safety is planned for ``hyper ``'s core objects,
13+ but in this early alpha it is not a high priority.
14+
15+ To use ``hyper `` in a multithreaded context the recommended thing to do is to
16+ place each connection in its own thread. Each thread should then have a request
17+ queue and a response queue, and the thread should be able to spin over both,
18+ sending requests and returning responses. The stream identifiers provided by
19+ ``hyper `` can be used to match the two together.
20+
21+ SSL/TLS Certificate Verification
22+ --------------------------------
23+
24+ By default, all HTTP/2.0 connections are made over TLS, and ``hyper `` uses the
25+ system certificate authorities to verify the offered TLS certificates.
26+ Currently certificate verification cannot be disabled.
27+
28+ Streaming Uploads
29+ -----------------
30+
31+ Just like the ever-popular ``requests `` module, ``hyper `` allows you to perform
32+ a 'streaming' upload by providing a file-like object to the 'data' parameter.
33+ This will cause ``hyper `` to read the data in 1kB at a time and send it to the
34+ remote server. You _must_ set an accurate Content-Length header when you do
35+ this, as ``hyper `` won't set it for you.
Original file line number Diff line number Diff line change @@ -45,6 +45,16 @@ The quickstart documentation will help get you going with ``hyper``.
4545
4646 quickstart
4747
48+ Advanced Documentation
49+ ----------------------
50+
51+ More advanced topics are covered here.
52+
53+ .. toctree ::
54+ :maxdepth: 2
55+
56+ advanced
57+
4858Frequently Asked Questions
4959--------------------------
5060
You can’t perform that action at this time.
0 commit comments