Posted: 31 Aug 2018 11:27 EDT Last activity: 8 Sep 2018 11:13 EDT
Is it possible to remove the Content-Type (text;charset=UTF-8) in a 401 Unauthorized REST Service Response
One of our clients consuming our REST service have requested that we remove the Content-Type (text;charset=UTF-8) when there is an authorization failure (401) from the Response as it doesn't actually contain any body.
Is this possible?
***Edited by Moderator Marissa to update platform capability tags****
If there is a auth failure - do you even get an opportunity to invoke an activity? I presumed it was handled directly by Pega. It would be great if you/someone can guide on how to invoke an activity when there is a auth failure.
Not sure I understand. I checked pyHTTPResponseCode and it looks like its used to set the HTTP Response code (200, 401, etc) - I was looking into how I can skip the content-type in the response when there is a 401 (auth failure)
When I add a Security-Error condition to the response (see attached screenshot) - I can't seem to leave the Content type field blank even though there is nothing mapped in the Message data (section below)