I am developing an API-Client for transferring real estates. The interface provided is using Oauth1 and multipart HTTP posts in order to upload attachment data. The service provider wants to have attachments uploaded in a certain format as described here: http://api.immobilienscout24.de/our-apis/import-export/attachments/post.html (section Example for picture) What I basically need to do is to create a MIME multipart post for
- An XML document
- A binary file
So far, I tried to use the file argument of rauth
, resp. requests
to deliver both, the XML and the binary file. But I cannot figure out how to add the different MIME types (e.g. application/xml and image/jpeg) to the respective multipart sections.
How can I do that?