requests icon indicating copy to clipboard operation
requests copied to clipboard

[models] Fix '_encode_params'/'_encode_files'

Open wy-z opened this issue 6 years ago • 3 comments
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]

wy-z avatar May 29 '19 08:05 wy-z

https://github.com/kennethreitz/requests/issues/5058

wy-z avatar May 29 '19 09:05 wy-z

Why was this PR deleted? This was a good fix imo.

martimlobao avatar Oct 10 '20 01:10 martimlobao

I'll reopen this if necessary. @martimlobao

wy-z avatar Oct 10 '20 02:10 wy-z