If got an Controller-Endpoint expecting a Dto containing just a list of Ids to fetch this specific list of IDs. When sending the following request to the endpoint, it returns an error “the idList field is required”, although I tried sending it multiple ways.
The Controller-Method:
[HttpGet("listById")]
public async Task<IActionResult> ListById([FromBody] IdListDto idList) =>
await Handle(Service.FindByList(idList));
The DTO:
public record IdListDto : IIdListDto
{
public ulong[]? Ids { get; set; }
}
Postman-Request and Result:
Postman-Request and Result](https://i.sstatic.net/M6QaOzQp.png)
I tried changing the request in different ways, like wrapping the “Ids”-Parameter in an idList-JsonObject, but the result ist the same. I dont actually need the dto and tried using just a simple array, but it didnt recognize that either. Any ideas on how to solve it?