Closed imclint21 closed 3 years ago
QueryHelpers.ParseQuery taks a query string, not a path an a querystring:
var query = QueryHelpers.ParseQuery("?ticket=8DE473F6-3DC6-4002-BE0F-EC4CE20445D81");
See the doc comment (as small as it is):
The raw query string value, with or without the leading '?'.
Oh yeah my bad, however maybe it could be great to parse the complete URI if it's passed?
That would be a different API, you can use URI to parse the url then get the query part and pass it in here
you can use [FromQuery] in your endpoint controller, like this:
[HttpGet()]
public IActionResult Get([FromQuery(Name = "ticket")] string ticket)
https://docs.microsoft.com/en-us/aspnet/core/mvc/models/model-binding?view=aspnetcore-3.1
Thank you for contacting us. Due to a lack of activity on this discussion issue we're closing it in an effort to keep our backlog clean. If you believe there is a concern related to the ASP.NET Core framework, which hasn't been addressed yet, please file a new issue.
This issue will be locked after 30 more days of inactivity. If you still wish to discuss this subject after then, please create a new issue!
Hi,
I use ParseQuery to get queries from the query string.
And I get this, I think it's a problem if this library does not parse correctly
Best regards