Hallgeir
Hallgeir

Reputation: 1273

Is there an alternative to batching requests (MapHttpBatchRoute) in ASP.NET Core WebAPI?

I'm working on migrating an ASP.NET WebAPI application to ASP.NET Core. In this application I'm using batch routes (as described here: https://devblogs.microsoft.com/aspnet/introducing-batch-support-in-web-api-and-web-api-odata/). It's quite elegant - all I need to do is to map a batch route using config.Routes.MapHttpBatchRoute, and then just batch whatever API requests I want to from the client. However, I haven't found an alternative to this in ASP.NET Core. Does it exist, or do I need to write batch APIs myself that perform what I need to do?

Upvotes: 1

Views: 1407

Answers (1)

SBFrancies
SBFrancies

Reputation: 4230

I've had success using this library: https://github.com/Tornhoof/HttpBatchHandler

It works for .Net Core 3.0 and newer. The documentation isn't the best though.

Upvotes: 1

Related Questions