packages.urllib3.filepost

Module Contents

Functions

choose_boundary() Our embarassingly-simple replacement for mimetools.choose_boundary.
iter_field_objects(fields) Iterate over fields.
iter_fields(fields)

Deprecated since version 1.6.

encode_multipart_formdata(fields,boundary=None) Encode a dictionary of fields using the multipart/form-data MIME format.
choose_boundary()

Our embarassingly-simple replacement for mimetools.choose_boundary.

iter_field_objects(fields)

Iterate over fields.

Supports list of (k, v) tuples and dicts, and lists of RequestField.

iter_fields(fields)

Deprecated since version 1.6.

Iterate over fields.

The addition of RequestField makes this function obsolete. Instead, use iter_field_objects(), which returns RequestField objects.

Supports list of (k, v) tuples and dicts.

encode_multipart_formdata(fields, boundary=None)

Encode a dictionary of fields using the multipart/form-data MIME format.

Parameters:
  • fields – Dictionary of fields or list of (key, RequestField).
  • boundary – If not specified, then a random boundary will be generated using mimetools.choose_boundary().