Friday, July 22, 2016

Change the authentication error message based on Accept Header in WSO2 API Manger

When you send the request with Accept header and the api call failed due to authentication failure, by default WSO2 API Manager will return the application/xml as a response. However, If you want your Accept header to be honored in the authentication failure cases. In my sample, I have just introduced to handle JSON and default as XML.