Minimal Api byte[] parameter binding problem

Viewed 158

If pass a byte array as parameter to a minimal api endpoint, like :

app.MapGet("api/srv/myget", [FromQuery] byte[] data) => DoSomethingWith(data);

then when I try tu run it throws an exception with:

No public static bool byte[].TryParse(string, out byte[]) method found for data.

For me is mandatory to keep the webservice's input format. Is there a way to do this with minimal API?

0 Answers
Related