Connect-REST fails to test successfully
An error occurred when testing a Connect-REST rule.
"The response was not recognized as JSON or XML and cannot be saved."
Steps to Reproduce
- Create a Connect-REST rule.
- Define basic parameters.
- Select Method name as POST.
- Provide the request content in XML format.
- Click Test.
A defect in custom application code or rules:
The error occurs because the response is formatted as HTML. The REST connector is expects JSON or XML, and does not handle HTML.
Perform the following local-change:
Update foreign service to return JSON or XML.