public class MyItem
{
public string Name { get; set; }
public int Count { get; set; }
}
[Route("/test2")]
public class TestCollectionDTORequest : IReturnVoid
{
public IList<MyItem> Items { get; set; }
}
What is a right way to send it from javascript using GET request?
There’s no support for sending complex types on the query string with popular JS libraries as its not recommended practice.
The JSV.js provides a JSV implementation in JavaScript which lets you serialize JSV with JSV.stringify(). But I’d be looking at redesigning your Service so this isn’t needed.
GET requests should be flat so they’re easily accessible by different HTTP libraries, clients, command-line utils, etc. You may want to instead consider sending a POST request instead.