Question

2
Replies
1844
Views
Close popover
Ganesh Bhat (bhatg)
PEGA
System Architect II
Pegasystems Inc.
IN
bhatg Member since 2016 1 post
PEGA
Posted: October 26, 2018
Last activity: October 30, 2018
Closed

Multipart Connect-Rest post request

Hi,

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

metadata:
body:
{
"personId":"personId",
"documentType":"DISPUTES",
"documentTitle":"response",
"description":"blah blah",
"caseId":"pega",
"agentUserId":"name of the agent that uploads the document",
"inboundChannel":"NETWORK"
}
file:

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.

Data Integration
Moderation Team has archived post,
Close popover This thread is closed to future replies. Content and links will no longer be updated. If you have the same/similar Question, please write a new Question.