You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
do not require the content of the request to be in memory but work with file-like-objects instead.
190
+
191
+
httpx request streaming using file-like objects is limited to "multipart/form-data".
192
+
It can not be used with "application/json" or "application/octet-stream".
193
+
Additionally it does not support choice of encoding (such as base16, base64url or quoted-printable) as possible with OpenAPI v3.1 contentEncoding, which should not be a limitation.
194
+
195
+
Use via `Manual Requests`_ using the :meth:`~aiopenapi3.request.RequestBase.request` API.
Responses exceeding the defined maximum content-length raise :class:`aiopenapi3.errors.ContentLengthExceededError` to prevent memory exhaustion.
186
245
Though it is possible to increase the defined maximum content-length, it is preferable to use streaming for large responses, limiting the amount of memory required.
@@ -219,13 +278,13 @@ The main difference in the async use of the streaming is await & async for.
219
278
220
279
221
280
Non-JSON Content
222
-
----------------
281
+
^^^^^^^^^^^^^^^^
223
282
In case the content isnot a model (application/octet-stream), the data can be read iteratively and written/processed.
224
283
225
284
See :aioai3:ref:`tests.stream_test.test_stream_data`.
226
285
227
286
JSON/Arrays of Models
228
-
---------------------
287
+
^^^^^^^^^^^^^^^^^^^^^
229
288
In case the large response is an array of models, iterative JSON parsing libraries can be used to process the data.
230
289
231
290
See :aioai3:ref:`tests.stream_test.test_stream_array`.
0 commit comments