In order to change your above method to post it would look like something below:
[WebInvoke(UriTemplate = "/tools/data/SearchAll")]
public JsonArray SearchAll(string tool, Dictionary<int,string> filters)
{
}
Your requestBody for the above method might look as shown below (You can inspect using Fiddler):
{
"tool": "enter the value of tool parameter",
"filters" :
{
{"Key":1,"Value":"Test"},
{"Key":2,"Value":"Test1"}
}
}
NOTE:
Assuming your key,value pair to be int,string
When you have a POST method, query strings are not supported.
Also rename your method that make it valid as per REST principals where method names indicate a resource on the server which performs a task. GetAll method with WebInvoke attribute is not a good practise.
The default method for WebInvoke is "POST" hence i am not specifying it explicitly.