@tsc1989 wrote:
Hi UiPath experts,
I need to setup a POST API call within my UiPath script. I have tested this POST request via POSTMAN and I am able to get a successful response. I have pasted the screenshots of POSTMAN below.
However, no matter how I try to setup the body in UiPath, I keep getting below error.
To pass the jpeg file in UiPath, I used some other advice and used below 2 lines to first convert it into a binary string.
Assign bytearray = File.ReadAllBytes(“filepath”)
Assign binarystring = Convert.ToBase64String(bytearray)Then I’m trying to pass document = binarystring. Tried doing it inside “body”, “attachments”, “parameters”, none of it works - I still get below error. Anyone knows how to solve this please? Thanks!
{“result”:“error”,“code”:100000,“errors”:[{“classification”:“DeserializationError”,“message”:“no multipart boundary param in Content-Type”},{“fieldNames”:[“document”,“url”],“message”:“Please provide either a document or a URL.”}],“request_id”:“Ay0AXP6TeUgMUuXcWg4YwStVMqQNBftp”}
Posts: 7
Participants: 2