Question

1
Replies
213
Views
trina_r Member since 2012 6 posts
Cognizant Technology Solutions
Posted: August 16, 2017
Last activity: August 16, 2017
Closed

URL encoded JSON object in resource param creating issue at destination API

We are required to send an URL encoded JSON object as a parameter to one of our Connect REST calls (GET method) .
When we send it as a resource param, the JSON object is repeated (part of it is repeated) at the receiver API end. When we switched to a request param instead, it's not repeated and it's reaching the API the way it should. Why is Pega treating the JSON object differently in these two cases ?Is it by design ?
We have used a custom utility function to create the JSON object from a Clipboard Page and then encoded it using UTF-8 encoder.

1. The JSON object passed from Pega as a resource param -
identify_request= %7B%22classname%22%3A%22aAFCI_IdentifyProcess_In%22%2C%22EffectiveDate%22%3A%222017-07-01%22%2C%22GBPNumber%22%3A%22CTR0000016739%22%2C%22IsInTestMode%22%3A%22false%22%2C%22MemberClass%22%3A%22%22%2C%22MemberDivision%22%3A%22%22%2C%22MemberId%22%3A%22ABCD-3%22%2C%22MemberSSN%22%3A%22%22%2C%22WithDetails%22%3A%22true%22%2C%22Products%22%3A%5B%7B%22Code%22%3A%22AG.CI.21.K.VOL.%231%22%2C%22EffectiveDate%22%3A%222016-07-01%22%7D%5D%7D
2. The JSON object received at destination API -
identify_request=%7B%22classname%22%3A%22aAFCI_IdentifyProcess_In%22%2C%22EffectiveDate%22%3A%222017-07-01%22%2C%22GBPNumber%22%3A%22CTR0000016739%22%2C%22IsInTestMode%22%3A%22false%22%2C%22MemberClass%22%3A%22%22%2C%22MemberDivision%22%3A%22%22%2C%22MemberId%22%3A%22ABCD-3%22%2C%22MemberSSN%22%3A%22%22%2C%22WithDetails%22%3A%22true%22%2C%22Products%22%3A%5B%7B%22Code%22%3A%22AG.CI.21.K.VOL.%231%22%2C%22EffectiveDate%22%3A%222016-07-01%22%7D%5D%7D%22aAFCI_IdentifyProcess_In%22%2C%22EffectiveDate%22%3A%222017-07-01%22%2C%22GBPNumber%22%3A%22CTR0000016739%22%2C%22IsInTestMode%22%3A%22false%22%2C%22MemberClass%22%3A%22%22%2C%22MemberDivision%22%3A%22%22%2C%22MemberId%22%3A%22ABCD-3%22%2C%22MemberSSN%22%3A%22%22%2C%22WithDetails%22%3A%22true%22%2C%22Products%22%3A%5B%7B%22Code%22%3A%22AG.CI.21.K.VOL.%231%22%2C%22EffectiveDate%22%3A%222016-07-01%22%7D%5D%7D

***Edited by Moderator Marissa to update categories***

Data Integration
Moderation Team has archived post
Share this page LinkedIn