-
Notifications
You must be signed in to change notification settings - Fork 10.7k
Minimal APIs doesn't support binding to StringValues from query or headers #36726
Copy link
Copy link
Closed
Closed
Copy link
Labels
Priority:2Work that is important, but not critical for the releaseWork that is important, but not critical for the releasearea-minimalIncludes minimal APIs, endpoint filters, parameter binding, request delegate generator etcIncludes minimal APIs, endpoint filters, parameter binding, request delegate generator etcfeature-minimal-actionsController-like actions for endpoint routingController-like actions for endpoint routingold-area-web-frameworks-do-not-use*DEPRECATED* This label is deprecated in favor of the area-mvc and area-minimal labels*DEPRECATED* This label is deprecated in favor of the area-mvc and area-minimal labelstriage-focusAdd this label to flag the issue for focus at triageAdd this label to flag the issue for focus at triage
Milestone
Metadata
Metadata
Assignees
Labels
Priority:2Work that is important, but not critical for the releaseWork that is important, but not critical for the releasearea-minimalIncludes minimal APIs, endpoint filters, parameter binding, request delegate generator etcIncludes minimal APIs, endpoint filters, parameter binding, request delegate generator etcfeature-minimal-actionsController-like actions for endpoint routingController-like actions for endpoint routingold-area-web-frameworks-do-not-use*DEPRECATED* This label is deprecated in favor of the area-mvc and area-minimal labels*DEPRECATED* This label is deprecated in favor of the area-mvc and area-minimal labelstriage-focusAdd this label to flag the issue for focus at triageAdd this label to flag the issue for focus at triage
Type
Fields
Give feedbackNo fields configured for issues without a type.
Describe the bug
Parameter binding doesn't support StringValues (which is ASP.NET Core's native representation of both query string and header values).
To Reproduce
OR
Exceptions (if any)
The first fails parameter binding things that
StringValuesis a body parameter.When adding
[FromQuery], it also fails but it's becauseStringValuesdoesn't have aTryParsemethod:It feels bad that our native representation doesn't work...