I want to use query parameters in my endpoint attributes but I'm not sure how to use them.
I tried this:
[HttpPost("fooBar/{version}?amount={amount}&date={date}")]
But I get this error instead:
Microsoft.AspNetCore.Routing.Patterns.RoutePatternException: The literal section '?amount=' is invalid. Literal sections cannot contain the '?' character. at Microsoft.AspNetCore.Routing.Patterns.RoutePatternParser.Parse(String pattern)
Or, what's the proper approach to set the query parameters if I want to hit an endpoint that looks like the one above?