Mocking async http calls with HttpResultsFilter

I have some unit tests that use the very useful HttpResultsFilter for mocking/testing results. However I’m switching some of the calls to be async and I can’t see how to do equivalent. I read the [wiki][1] and looked at the [HttpUtilsMockTests][2] but these are all for sync calls and I can’t see equivalent tests for async - is this something that’s possible?

E.g.

[Fact]
public void SyncTest()
{
    HttpWebRequest webRequest = null;

    using (new HttpResultsFilter
    {
        StringResultFn = (request, s) =>
        {
            webRequest = request;
            return "result";
        }
    })
    {
        const string url = "http://127.0.0.1:8500/v1/kv/testKey";
        url.SendStringToUrl("GET", accept: MimeTypes.Json);

        webRequest.RequestUri.Should().Be(url);
    }
}

works fine but

[Fact]
public async Task AsyncTest()
{
    HttpWebRequest webRequest = null;

    using (new HttpResultsFilter
    {
        StringResultFn = (request, s) =>
        {
            webRequest = request;
            return "result";
        }
    })
    {
        const string url = "http://127.0.0.1:8500/v1/kv/testKey";
        await url.SendStringToUrlAsync("GET", accept: MimeTypes.Json);

        webRequest.RequestUri.Should().Be(url);
    }
}

Tries to make the actual HTTP request and I can’t intercept it at all.
[1]: https://github.com/ServiceStack/ServiceStack/wiki/Http-Utils#user-content-http-utils-are-mockable
[2]: https://github.com/ServiceStack/ServiceStack.Text/blob/master/tests/ServiceStack.Text.Tests/HttpUtilsMockTests.cs

It wasn’t supported before, but I’ve just added support for mocking Async API’s in this commit.

This is available from v4.0.57 that’s now available on MyGet.

Awesome! Thanks very much, will give it a try.