Adding form data to urlConnection POST request

Thanks for the response. I am really looking for a worked example where the request is built. I’ve tried doing this (authentication blanked):

ucExtractConceptsFromFile.ClearRequestHeaders
// Use basic authentication
ucExtractConceptsFromFile.RequestHeader ("Authorization") = "Basic " + EncodeBase64("***" + ":" + "***")
ucExtractConceptsFromFile.RequestHeader("Content-Type") = "text/plain"
ucExtractConceptsFromFile.RequestHeader("Accept") = "text/plain"

// Put together the multipart package
requestPackage = "--------------------------830792918371557810383557"
requestPackage = requestPackage + EndOfLine.CRLF + "Content-Disposition: form-data; name=" + """file""" + "; filename="+f.NativePath
requestPackage = requestPackage + EndOfLine.CRLF + "<" + f.Name + ">"
requestPackage = requestPackage + EndOfLine.CRLF + "Content-Type: text/plain"
requestPackage = requestPackage + EndOfLine.CRLF + "--------------------------830792918371557810383557--"
// note the extra two dashes at the end of the line above; Postman adds these so I've reproduced that here

ucExtractConceptsFromFile.SetRequestContent(f.NativePath, "multipart/form-data; boundary=" + requestPackage)

requestURI = "https://[myuri]"

// get the response back into taRawTagJson
taRawTagJson.text = ucExtractConceptsFromFile.SendSync("POST", requestURI)

From reading Björn’s posting (URLConnection form data) I thought this might work. But I get a terse message back saying “Could not find acceptable representation”

I’m pretty sure there is a simple fix for this - I’m sending a plain text file and expecting plain text back (though it will end up as JSON). It works with Postman and I’m just trying to reproduce that.
Has anyone done this?