Have you tried just using your string as the POST body like this?
Based on a bit of searching, it seems to me your C# code probably uses WebClient.UploadData like in this SO answer. I looked up the method WebClient.UploadString, and if you look at the remarks section, this method simply takes your string and converts it to a byte array before sending it. So, I think that’s how Mendix would handle sending a string as well.
You probably need to write your own Java code for that or do some string manipulation to cut the string up in multiple objects in microflow. But I still can not grasp how you create the string in the first place. If you create the string in a microflow why not create NP objects and use those for the REST post.
Regards,
Ronald
I got it working by downloading the Rest Services from the App Store and using it’s post activity. It can send binary data.
Thank you all.
If you already have a byte array then you will need to know what type of encoding was used to make it into that byte array.
For example, if the byte array was created like this:
byte[] bytes = Encoding.ASCII.GetBytes(someString);
You will need to turn it back into a string like this:
string someString = Encoding.ASCII.GetString(bytes);
If you can find in the code you inherited, the encoding used to create the byte array then you should be set.