How to send back http 200 response without hitting TargetURL in PreFlow?

Not applicable

Hi,

I want to send back JSon response with HTTP status code as 200 OK without hitting to target URL depending on Variable value i.e. if variable having value then hit target URL else send back HTTP 200 status code with Json response but without using Raised fault policy.

Solved Solved
0 1 1,095
1 ACCEPTED SOLUTION

Simple solution is to have a route rule with no TargetEndpoint...

<RouteRule name="notarget"/>

You can put a condition on it if require.

Then in the Response PreFlow use an Assign Message policy to set the Response as 200.

View solution in original post

1 REPLY 1

Simple solution is to have a route rule with no TargetEndpoint...

<RouteRule name="notarget"/>

You can put a condition on it if require.

Then in the Response PreFlow use an Assign Message policy to set the Response as 200.