Missing ITypedFilterAsync

Hi,

I’m working on a filter for a single DTO request. Is there an async version of the ITypedFilter interface?

On documentation (https://docs.servicestack.net/request-and-response-filters), I found only the async version of the Global filter.

Thank you

There wasn’t before but I’ve added support for async Typed Request Filters in this commit, basically there’s now an *Async overload for every sync Typed Request Filter API.

This is now available from the latest v5.10.5 that’s now available on MyGet.

Alternatively you can just register an async Request Filter and check the Request DTO type, e.g:

GlobalRequestFiltersAsync.Add(async (req, res, dto) => 
{
    if (dto is MyRequest myRequest)
    {
        //...        
    }
});

Hi mythz,

Thank you for your fast response and fix :grinning:

1 Like