While this may be a bit different than using Watson with this, I was successful in POSTing an image using the Mendix REST Module (post JA) from the appstore instead of the native REST call. Listed below is the link to the answer I found to make this work.
https://forum.mendix.com/link/questions/90668
If you create a NPE called Root and associate it to the system.image entity and then set the association name as 'images_file' (or in my case "some_data") this worked for me. Use the REST Module "post" Java Action and set the "Submit as form data" to true it sets that for you. I did not add any other headers (were not needed) other than the Authorization.
Hi Sytze,
This is exactly what we did using plain Mendix 7.15.1. Using the Watson Services module.
https://modelshare.mendix.com/models/9b466026-4b39-427f-a147-fba377d50b29/post-watson-image-for-recognition.
https://www.dropbox.com/s/olefs374jo8zkqj/SUB_Classify_Image_POST.mpk?dl=0
In the Capp REST Service Action, for the Request, you can choose "Binary for the Entire Request". You can select an image there.
A new test in Postman was succesful: using 'Content-Type: form-data' and adding a key in the body 'images_file' and set a file as value works. But how to set a file as value within Mendix?