Multipart Connect-Rest post request
For one of our requirement, we need to send zip files to client along with json data in Connect-Rest post request. Below is the request format we need to send
"agentUserId":"name of the agent that uploads the document",
For json data, I have created the data transform and mapping the request and for file data I am setting properties ".pyAttachNames to file, .pyAttachTypes to zip, .pyAttachValues to attach stream and .pyAttachFileNames to actual filename with extension" in pyRequestAttachmentPage.
In Connect-Rest rule post method, I am mapping request from clipboard property .request.body_POST, however i am getting 400 bad request error when the rest rule is invoked. When i checked log after setting loggers i can see below messages
Adding outbound message data to the POST request
Request attachment page detected. Attemtping to construct multipart message.
Multipart request message has been constructed.
Request message size is 24850 bytes.
HTTP Status code: 400 Bad Request
It would be helpful if anyone knows how to debug and correct the issue.