forked from psf/requests
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Previously, data, params, and files were encoded and stored in Request.__init__, and subsequently put into service during Request.send. The problem with this approach is that hooks and auth callables need to be aware of the eager encoding, and if they touch the originals, make sure to update the encoded versions. A better approach is to only encode late in the sending process. This way, hooks and auth callables can safely make changes without fear of the old, encoded variant overriding it.
- Loading branch information
Showing
1 changed file
with
15 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters