I've got a Web API 2 method like so:
[Route("api/notifications/{username}")] //attribute routing, new in Web API 2 //[HttpGet] public IEnumerable<Notification> GetNewNotifications(string username) { return Notification.GetNewNotifications(username); } ...which I consume in javascript w/ jquery like so:
$.getJSON('/api/notifications/' + username) Which works fine. But what is the correct way to pass in addition arguments? I've seen different answers and it's unclear to me. I don't think I want to pass in them in via forward-slashes because they aren't hierarchical in nature. Normally I'd do this w/ querystring params, but I don't know how to pick them up in the server-side.
thanks!