1
votes

We're using Odata to do custom queries. We do this by returning an IQueryable from an Controller method, and apply the [EnableQuery] attribute. Easy peasy.

Unfortunately one of the use cases is to query ($filter) by using a lot of id's. Which results in the uri being too long. The lenghth of the Uri is not a .net core restriction, but other parts of our infrastructure have these restrictions.

The idea that I have is to use a Post instead of a Get, with the query options as part of the body of the post. This circumvents the size restriction. But I have not found a way to do this.

1

1 Answers

0
votes

Have a look at this - Simple Odata Client

Using a batch query makes the request a post request. You don't have to necessarily attach multiple requests to make it a batch request. Take a look as below:-

enter image description here