Skip to content

Commit 3384c1f

Browse files
committed
update doc for response class
1 parent 54c5423 commit 3384c1f

File tree

2 files changed

+32
-23
lines changed

2 files changed

+32
-23
lines changed

docs/web.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,7 @@ so application developer can use classes if he wants::
127127
app.router.add_route('GET', '/intro', handler.handle_intro)
128128
app.router.add_route('GET', '/greet/{name}', handler.handle_greeting)
129129

130+
130131
Custom conditions for routes lookup
131132
-----------------------------------
132133

docs/web_reference.rst

Lines changed: 31 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -140,29 +140,6 @@ first positional parameter.
140140

141141
.. versionadded:: 0.15
142142

143-
.. attribute:: compression
144-
145-
Read-only :class:`bool` property, ``True`` if compression is enabled.
146-
147-
``False`` by default.
148-
149-
.. versionadded:: 0.14
150-
151-
.. seealso:: :meth:`enable_compression`
152-
153-
.. method:: enable_compression(force=False)
154-
155-
Enable compression.
156-
157-
When *force* is ``False`` (default) compression is used only
158-
when *deflate* is in *Accept-Encoding* request's header.
159-
160-
*Accept-Encoding* is not checked if *force* is ``True``.
161-
162-
.. versionadded:: 0.14
163-
164-
.. seealso:: :attr:`compression`
165-
166143
.. attribute:: payload
167144

168145
A :class:`~aiohttp.streams.FlowControlStreamReader` instance,
@@ -373,18 +350,49 @@ StreamResponse
373350
Disable :attr:`keep_alive` for connection. There are no ways to
374351
enable it back.
375352

353+
.. attribute:: compression
354+
355+
Read-only :class:`bool` property, ``True`` if compression is enabled.
356+
357+
``False`` by default.
358+
359+
.. versionadded:: 0.14
360+
361+
.. seealso:: :meth:`enable_compression`
362+
363+
.. method:: enable_compression(force=False)
364+
365+
Enable compression.
366+
367+
When *force* is ``False`` (default) compression is used only
368+
when *deflate* is in *Accept-Encoding* request's header.
369+
370+
*Accept-Encoding* is not checked if *force* is ``True``.
371+
372+
.. versionadded:: 0.14
373+
374+
.. seealso:: :attr:`compression`
375+
376376
.. attribute:: chunked
377377

378378
Read-only property, indicates if chunked encoding is on.
379379

380380
Can be enabled by :meth:`enable_chunked_encoding` call.
381381

382+
.. versionadded:: 0.14
383+
384+
.. seealso:: :attr:`enable_chunked_encoding`
385+
382386
.. method:: enable_chunked_encoding
383387

384388
Enables :attr:`chunked` encoding for response. There are no ways to
385389
disable it back. With enabled :attr:`chunked` encoding each `write()`
386390
operation encoded in separate chunk.
387391

392+
.. versionadded:: 0.14
393+
394+
.. seealso:: :attr:`chunked`
395+
388396
.. attribute:: headers
389397

390398
:class:`~aiohttp.multidict.CIMultiDict` instance

0 commit comments

Comments
 (0)