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

David King 96 Reputation points
2021-01-19T14:02:43.743+00:00

When we add in this policy:

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

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?

Thanks,
David

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