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

[Miniflare 3] Add outboundService option for customising global fetch() target #629

Merged
merged 1 commit into from
Jul 15, 2023

Commits on Jul 15, 2023

  1. Add outboundService option for customising global fetch() target

    `workerd` exposes a `globalOutbound` option for customising which
    service global `fetch()` calls should be dispatched to. For tests,
    it's useful to be able to mock responses to certain routes or assert
    certain requests are made. This new option allows `fetch()` call to
    be sent to another configured Worker. See the added test for an
    example.
    
    Note support for `undici`'s `MockAgent` API in Miniflare 3 is still
    planned. This is a lower-level primitive for customising `fetch()`
    responses.
    mrbbot committed Jul 15, 2023
    Configuration menu
    Copy the full SHA
    edaef43 View commit details
    Browse the repository at this point in the history