Question
5
Replies
3799
Views
Capgemini
Posted: July 19, 2017
Last activity: June 6, 2018
Closed
Multipart Request for Connect-Rest
Hi,
There is a requirement where I need to pass html file as an attachment in the request for connect rest.
Tried setting a base64 encoded value of the html stream in pyRequestAttachmentPage.pyAttachValues(1) but getting 400 error code.
Along with attachment, I also need to pass some values in 2 query string parameters ( i.e. Query String parameters are: metadata & content)
Please suggest how can this be achieved ?
***Updated by moderator: Lochan to add Categories***
***Updated by moderator: Marissa to close post***
This post has been archived for educational purposes. Contents and links will no longer be updated. If you have the same/similar question, please write a new post.
Hi Sarabdeep,
As you are getting error when using pyRequestAttachmentPage, take a look at the response to below post which might help you to identify what is causing the error.
https://pdn.pega.com/community/product-support/question/unable-string-attachment-using-pega-post-rest-api
Also check the below article for more reference:
https://pdn.pega.com/support-articles/unable-send-attachment-connect-rest
This Help document may also be useful (it may not say REST but it applies to connect REST):
https://pdn.pega.com/sites/pdn.pega.com/files/help_v73/procomhelpmain.htm#rule-/rule-connect-/AttachmentsSOAPdotNetHttp.htm