requests
requests copied to clipboard
[models] Fix '_encode_params'/'_encode_files'
trafficstars
Look at https://github.com/kennethreitz/requests/blob/master/requests/models.py#L100 or https://github.com/kennethreitz/requests/blob/master/requests/models.py#L131
for v in vs:
if v is not None:
...
When the type of vs is dict, v will be the field key, but not field value, the body of the request will be puzzling.
It would be better to prevent it.
Signed-off-by: weiyang [email protected]
https://github.com/kennethreitz/requests/issues/5058
Why was this PR deleted? This was a good fix imo.
I'll reopen this if necessary. @martimlobao