Why is using a 'Control Flow' policy is stripping the body of the incoming request?

David King 96 Reputation points

When we add in this policy:

<when condition="@(context.Request.Body.As<string>().Contains("AddWarrantyClaim"))">
<set-backend-service base-url="some-url" />
<set-backend-service base-url="some-other-url" />

It works as expected and will change the backend. The issue we're running into is that for whatever reason, it's stripping the body of the request before sending it to the backend.

We confirmed the policy is doing this as when we remove the policy, everything else works.

Any thoughts or ideas?


Azure API Management
Azure API Management
An Azure service that provides a hybrid, multi-cloud management platform for APIs.
1,805 questions
0 comments No comments
{count} votes

0 additional answers

Sort by: Most helpful