Chunked transfer encoding is a mechanism for transferring data in an HTTP request. With this mechanism, the data is sent in a series of chunks. Requests supports chunked transfer encoding, for both outgoing and incoming requests. In order to send a chunk encoded request, we need to supply a generator for your body.
The usage is shown in the following example:
>>> def generator(): ... yield "Hello " ... yield "World!" ... >>> requests.post('http://example.com/some/chunked/url/path', data=generator())