You just need to add [FromUri]
before parameter, looks like:
GetCategories([FromUri] int[] categoryIds)
And send request:
/Categories?categoryids=1&categoryids=2&categoryids=3
More Related Contents:
- How do I set a cookie on HttpClient’s HttpRequestMessage
- Best practice to return errors in ASP.NET Web API
- 404 error after adding Web API to an existing MVC Web Application
- web-api POST body object always null
- Web Api – Fire and Forget
- Web API – 405 – The requested resource does not support http method ‘PUT’
- C# appointing distinct array elements randomly to another array
- How to use (get and set) httpcontext.current.Session in the class library, within MVC web api application? [duplicate]
- What is the overhead of creating a new HttpClient per call in a WebAPI client?
- Adding values to a C# array
- How to return a file (FileContentResult) in ASP.NET WebAPI
- Multiple HttpPost method in Web API controller
- Simple post to Web Api
- Overhead of a .NET array?
- failed to serialize the response in Web API
- How to “flatten” or “index” 3D-array in 1D array?
- Web Api How to add a Header parameter for all API in Swagger
- Testing equality of arrays in C#
- Correlation of two arrays in C#
- How to extend IdentityUser with custom property
- How to get a dimension (slice) from a multidimensional array
- C# Permutation of an array of arraylists?
- Application_Error in global.asax not catching errors in WebAPI
- swagger-ui returns 500 after deployment
- Read HttpContent in WebApi controller
- Iterate through 2 dimensional array c#
- WebAPI and ODataController return 406 Not Acceptable
- Why can’t I use the array initializer with an implicitly typed variable?
- ASP.NET Web API and [Serializable] class
- Running self-hosted OWIN Web API under non-admin account