I'm trying to figure out how to add multipart headers for a multipart form-data form using a roUrlTransfer object.
The problem is that you need to separate each of the "parts" with a boundary, and the requisite newlines need to be there between sections. If I try to fudge these headers by adding the newlines myself, the header gets rejected, and doesn't make it to the server.
Is there any way to build a multipart header, without implementing this myself?
I was able to accomplish this by creating the body like you mentioned in a String then loading it into an roByteArray, and writing it to a temp file Then I load my binary file into an roByteArray and use AppendFile to append the contents to the first file I then append the final boundary String bytes (Boundary + "--" + Chr(13) + Chr(10) + Chr(13) + Chr(10)) to that same file
The final step is to use AsyncPostFromFile with that temporary file.