Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for arrays/lists from querystring in Wolverine HTTP endpoints #1137

Closed
DurinMusicspear opened this issue Nov 19, 2024 · 1 comment · Fixed by #1145
Closed

Support for arrays/lists from querystring in Wolverine HTTP endpoints #1137

DurinMusicspear opened this issue Nov 19, 2024 · 1 comment · Fixed by #1145
Labels
enhancement New feature or request http

Comments

@DurinMusicspear
Copy link

Describe the solution you'd like
In .Net you can use [FromQuery] to get an array/list from the query string, something like:

[HttpGet(template:"/v2",Name = "GetMultipleQueryStringsAsArray")]
public IActionResult GetProductsByIds([FromQuery] int[] ids)
{
    return Ok(new {ProductIds=ids});
}

This does not seem to work in Wolverine when i tested it, neither with or without [FromQuery] attribute.

@jeremydmiller jeremydmiller added enhancement New feature or request http labels Nov 21, 2024
@jeremydmiller
Copy link
Member

@DurinMusicspear It's the usage of Array that gets us. Wolverine.HTTP is happily supporting IEnumerable<T> and any flavor of IList<T>. Array mechanics are different.

This will be supported in Wolverine 3.4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request http
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants