Posted: 25 Aug 2020 23:26 EDT Last activity: 26 Aug 2020 21:51 EDT
How to see response header in pega REST call
Hi we are use an existing REST Api in our application , recently the reponse header are added to the existing REST api . I am unable to see the response value as well as header values when i change to new endpoint .
Please suggest your though to make it work.
***Moderator: Pallavi to update platform capability tags***
The below approach allows you to observe the HTTP headers from the response from the Tracer on 8.4. Hopefully it works on your version of Pega.
Trace the REST call
Find the "Activity End" events for pyInvokeRESTConnector, Invoke or - in the event of the REST call being performed by a Data Page - the relevant "Step End" event of pxCallConnector. All appear to share the same Parameter page
Click on the "Activity End" label in the tracer to open the Trace Event page
Open the Parameter Page for that Trace Event
Search for the parameter pzResponseHeaderMap
This appears to show the actual HTTP Response Headers regardless of whether the Connect-REST rule is configured to map any of them to the service page. They are shown as a JSON object of name-value pairs, which should be OK for you as a human to visually inspect.
Use this only for your diagnostic purposes. Any intent for your application to utilize the response headers should be configured in the Response tabs of the Connect-REST rule. By the time the engine returns control to a rule that you have configuration control over (Connect-REST, Response Data Transform, Data Page post-processing activity), I'd be surprised if this Parameter was still accessible.