Skip to content
Myr

v1.1.0 and docs

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Kenneth Reitz · committed by Kenneth Reitz · parent 9d33629 · Browse files · 3 files+35 added−4 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

3 files+35 added−4 removed

  • other:+35 added−4 removed

3 files+35 added−4 removed

modified:docs/user/advanced.rst+22 added
136 unmodified lines
137138Note that connections are only released back to the pool for reuse once all body data has been read; be sure to either set ``stream`` to ``False`` or read the ``content`` property of the ``Response`` object.139140141Streaming Uploads142-----------------143144Requests supports streaming uploads, which allow you to send large streams or files without reading them into memory. To stream and upload, simply provide a file-like object for your body::145146 with open('massive-body') as f:147 request.post('http://some.url/streamed', data=f)148149150Chunk-Encoded Requests151----------------------152153Requests also supports Chunked transfer encoding for outgoing and incoming requests. To send a chunk-encoded request, simply provide a generator (or any iterator without a length) for your body::154155156 def gen():157 yield 'hi'158 yield 'there'159160 request.post('http://some.url/chunked', data=gen())161162163Event Hooks164-----------165166Requests has a hook system that you can use to manipulate portions of
339 unmodified lines
modified:requests/__init__.py+4 added-4 removed
34 unmodified lines
3536The other HTTP methods are supported - see `requests.api`. Full documentation37is at <http://python-requests.org>.3839:copyright: (c) 2012 by Kenneth Reitz.39:copyright: (c) 2013 by Kenneth Reitz.40:license: Apache 2.0, see LICENSE for more details.4142"""4344__title__ = 'requests'45__version__ = '1.0.4'46__build__ = 0x0100445__version__ = '1.1.0'46__build__ = 0x01010047__author__ = 'Kenneth Reitz'48__license__ = 'Apache 2.0'49__copyright__ = 'Copyright 2012 Kenneth Reitz'49__copyright__ = 'Copyright 2013 Kenneth Reitz'505152from . import utils53from .models import Request, Response, PreparedRequest
18 unmodified lines
modified:HISTORY.rst+9 added
1 unmodified line
23History4-------561.1.0 (2013-01-10)7++++++++++++++++++89- CHUNKED REQUESTS10- Support for iterable response bodies11- Assume servers persist redirect params12- Allow explicit content types to be specified for file data13- Make merge_kwargs case-insensitive when looking up keys14151.0.3 (2012-12-18)16++++++++++++++++++1718- Fix file upload encoding bug
592 unmodified lines