Upload File With Http Client (multipart/form-data)
Join the DZone community and get the full member experience.Join For Free
def post_multipart(host, selector, fields, files): """ Post fields and files to an http host as multipart/form-data. fields is a sequence of (name, value) elements for regular form fields. files is a sequence of (name, filename, value) elements for data to be uploaded as files Return the server's response page. """See the rest of the implementation here
Opinions expressed by DZone contributors are their own.