class documentation

class RequestEncodingMixin(object):

Known subclasses: requests.models.PreparedRequest

View In Hierarchy

Undocumented

Static Method ​_encode​_files Build the body for a multipart/form-data request.
Static Method ​_encode​_params Encode parameters in a piece of data.
Property path​_url Build the path URL to use.
@staticmethod
def _encode_files(files, data):

Build the body for a multipart/form-data request.

Will successfully encode files when passed as a dict or a list of tuples. Order is retained if data is a list of tuples but arbitrary if parameters are supplied as a dict. The tuples may be 2-tuples (filename, fileobj), 3-tuples (filename, fileobj, contentype) or 4-tuples (filename, fileobj, contentype, custom_headers).

@staticmethod
def _encode_params(data):

Encode parameters in a piece of data.

Will successfully encode parameters when passed as a dict or a list of 2-tuples. Order is retained if data is a list of 2-tuples but arbitrary if parameters are supplied as a dict.

@property
path_url =
Build the path URL to use.