Hi Kirtish,
If you have a REST API endpoint that supports a single straight binary file, you can use the native Web API Services feature by setting the Body Content to Single File and then find ways to upload the file in binary format to the exposed binary parameter.
If you have a multipart/form-date involving a binary field, I am afraid you are not able to use Web API Services, neither a generic VBO like Utility - HTTP VBO to achieve this. The main reason is the data format of the Body field, is in Text/String, which is not capable of storing binary data. In the case of Web API Services feature, it would implicitly convert any binary fields to Base64 encoding, resulting in the file become not readable once uploaded by the endpoint. You must either devise a heavily customised VBO, or use a pure code stage approach to achieve this. I have created an example by using the code sample from
https://briangrinstead.com/blog/multipart-form-post-in-c/ before for a customer. I have attached here for your reference. The said example works with
Microsoft Cognitive Services > Analyze Image endpoint (
https://westus.dev.cognitive.microsoft.com/docs/services/computer-vision-v3-2/operations/56f91f2e778daf14a499f21b) . The endpoint accepts three different types of inputs, and the example implements "multipart/form-data" specifically.
------------------------------
Bruce Liu
Senior Product Consultant, Professional Services
Blue Prism
Australia/Sydney
------------------------------