Contents tagged with ASP .NET Web API

  • Accepting multiple parameters the "RESTful" way using ASP .NET Web API

    So I came upon a requirement at work to support accepting multiple ids in the Url of a "REST" request.  I have no idea if this is actually considered RESTful or not, but the idea was to formulate the URL like so:

    GET /FooResource/id1;id2;id3;id4/

    The idea was to be able to retrieve multiple instances of FooResource with one request.

    So, I came up with the following MVC ActionFilter to make my life a little bit easier:

    public class ArrayInputAttribute : ActionFilterAttribute

    { …

    Read More...
  • 1