Issue with consuming a REST service of type multipart/mixed
Trying to consume a REST API of type mutlipart/mixed with a file and JSON. Followed the below steps outlined in support articles but service throws the error "UNSUPPORTED_MEDIA_TYPE". This is mainly because Pega setting the content-type header by default as "multipart/form-data" even though mentioning as "multipart/mixed" in Connect REST rule. Anyway to overcome this?
1) Create pyRequestAttachmentPage page
2) Add values for pyAttachNames, pyAttachTypes, pyAttachValues, pyAttachFileNames
3) Fire the connect-REST rule
Pega Version: 7.3.1
Unsupported Media Type response code may come if the server refuses to accept the request because it is in unsupported format. Can you check the Content-Type or Content-Encoding? Please refer to the below articles.
https://stackoverflow.com/questions/24932080/rest-webservice-returning-415-unsupported-media-type
https://stackoverflow.com/questions/49856635/415-unsupported-mediatype-for-content-type-mulitpart-form-data