Question
Evonsys (PVT) LTD
LK
Last activity: 23 Oct 2025 22:49 EDT
How to replicate a Postman multipart/form-data request in a Pega Connect REST rule?
Hi everyone,
I’m trying to replicate a working Postman API request inside my Pega application using a Connect REST rule.
In Postman, my request configuration is as follows:
-
Method: POST
-
Body Type: form-data
-
Fields:
-
-
file: (actual file upload, e.g., PDF or text file)
-
-
Postman automatically sets:
Content-Type: multipart/form-data; boundary=----WebKitFormBoundary12345
This setup works fine in Postman and successfully uploads the file.
Now I’m trying to do the same in Pega, but I’m unsure about the exact configuration steps for:
-
The Request tab (how to map multipart/form-data parts correctly)
-
Mapping the file content (should I use
.pyAttachStream?) -
Whether I need to convert the file into binary or Base64
-
Whether I should manually set the Content-Type header, or let Pega handle it automatically
Can someone please explain or share a sample Connect REST configuration that matches a Postman form-data request with a file upload?
Screenshots or best practices would be very helpful.
Hi everyone,
I’m trying to replicate a working Postman API request inside my Pega application using a Connect REST rule.
In Postman, my request configuration is as follows:
-
Method: POST
-
Body Type: form-data
-
Fields:
-
-
file: (actual file upload, e.g., PDF or text file)
-
-
Postman automatically sets:
Content-Type: multipart/form-data; boundary=----WebKitFormBoundary12345
This setup works fine in Postman and successfully uploads the file.
Now I’m trying to do the same in Pega, but I’m unsure about the exact configuration steps for:
-
The Request tab (how to map multipart/form-data parts correctly)
-
Mapping the file content (should I use
.pyAttachStream?) -
Whether I need to convert the file into binary or Base64
-
Whether I should manually set the Content-Type header, or let Pega handle it automatically
Can someone please explain or share a sample Connect REST configuration that matches a Postman form-data request with a file upload?
Screenshots or best practices would be very helpful.
POstman SS ->>

request body ->

Authentication id basic Auth.