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 Async API integration #18

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

Add Async API integration #18

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 Async API integration in a step-by-step doc and within an API.

You could use httpbin service to mock the async behavior:

<inbound>
    <set-backend-service base-url="https://httpbin.org" />
    <rewrite-uri template="/redirect-to" copy-unmatched-params="false" />
    <set-query-parameter name="url" exists-action="append">
        <value>https://httpbin.org/status/200,302</value>
    </set-query-parameter>
    <base />
</inbound>
<backend>
    <base />
</backend>
<outbound>
    <base />
    <retry condition="@(((IResponse)context.Variables["var"]).StatusCode == 202)" count="10" interval="5">
        <send-request mode="new" response-variable-name="var" ignore-error="false">
            <set-url>@(context.Response.Headers["location"][0])</set-url>
            <set-method>GET</set-method>
        </send-request>
    </retry>
    <return-response response-variable-name="var" />
</outbound>
<on-error>
    <base />
</on-error>
@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
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