Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add custom policy external integration #17

Open
dsanchor opened this issue Feb 13, 2023 · 0 comments
Open

Add custom policy external integration #17

dsanchor opened this issue Feb 13, 2023 · 0 comments
Labels
apis documentation Improvements or additions to documentation

Comments

@dsanchor
Copy link
Owner

dsanchor commented Feb 13, 2023

Add custom policy external integration to both step-by-step and a provisioned API.

As an example, httpbin service could be used as backend mock:

    <send-request mode="new" response-variable-name="validationresponse" timeout="20" ignore-error="true">
        <set-url>https://httpbin.org/status/200,403</set-url>
        <set-method>GET</set-method>
    </send-request>
    <choose>
        <!-- Check active property in response -->
        <when condition="@((int)((IResponse)context.Variables["validationresponse"]).StatusCode == 403)">
            <!-- Return 403  -->
            <return-response>
                <set-status code="403" reason="Custom validation failed" />
            </return-response>
        </when>
    </choose>
@dsanchor dsanchor converted this from a draft issue Feb 13, 2023
@dsanchor dsanchor added documentation Improvements or additions to documentation apis labels Feb 13, 2023
@dsanchor dsanchor changed the title Add Async API integration Add custom policy external integration Feb 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
apis documentation Improvements or additions to documentation
Projects
Status: 📋 Backlog
Development

No branches or pull requests

1 participant