Lazily encode data, params, files
Before adoption: this commit came in with the history the project adopted, so no landing records it.
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.
This commit
State
Before adoption: this commit came in with the history the project adopted, so no landing records it.
Diff stats
1 file+15 added−21 removed
- other:+15 added−21 removed