Skip to content
Myr

Change ordering of data + params back.

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Fixes #795

authored by Ian Cordasco · committed by Ian Cordasco · parent b130b98 · Browse files · 1 file+7 added−6 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+7 added−6 removed

  • other:+7 added−6 removed

1 file+7 added−6 removed

modified:requests/models.py+7 added-6 removed
350 unmodified lines
351 new_fields = []352 fields = to_key_val_list(self.data)353 files = to_key_val_list(files)354355 for field, val in fields:356 if isinstance(val, list):357 for v in val:358 new_fields.append((k, str(v)))359 else:360 new_fields.append((field, str(val)))361362 for (k, v) in files:363 # support for explicit filename364 if isinstance(v, (tuple, list)):365 fn, fp = v
5 unmodified lines
371 if isinstance(fp, bytes):372 fp = BytesIO(fp)373 new_fields.append((k, (fn, fp.read())))374368 for field, val in fields:369 if isinstance(val, list):370 for v in val:371 new_fields.append((k, str(v)))372 else:373 new_fields.append((field, str(val)))375 body, content_type = encode_multipart_formdata(new_fields)376377 return body, content_type378
488 unmodified lines