For the GET request when Content-Type: application/json is added, it causes the following error:
{"fault":{"faultstring":"Failed to execute the RegularExpressionProtection StepDefinition RegularExpressionProtection.Injection. Reason: Unexpected token at position 0.","detail":{"errorcode":"steps.regexprotection.ExecutionFailed"}}}
Similarly for Content-Type: application/xml, the below is seen:
{"fault":{"faultstring":"Failed to execute the RegularExpressionProtection StepDefinition RegularExpressionProtection.Injection. Reason: Premature end of document while parsing at line 1(possibly around char 0)","detail":{"errorcode":"steps.regexprotection.ExecutionFailed"}}}
Whereas, a GET call without the content type returns a successful response.
Solved! Go to Solution.
This is the expected behavior. The XPath will fail to extract if you do not pass a content type. Well, not "fail".. Actually it would do nothing. But it would be working as designed, though not working as you desire or expect.
This is the reason the GET call without the content type returns a 200 as it is doing nothing.
This is the expected behavior. The XPath will fail to extract if you do not pass a content type. Well, not "fail".. Actually it would do nothing. But it would be working as designed, though not working as you desire or expect.
This is the reason the GET call without the content type returns a 200 as it is doing nothing.
A related discussion here - https://community.apigee.com/questions/38478/regularexpression-from-xmlpayload.html
@Stephen Gilson Can we have this documented?
@Akash Prabhashankar I added a new section to the doc here with this info.
Stephen
User | Count |
---|---|
7 | |
2 | |
2 | |
2 | |
1 |