I know this is really old, but I wanted the same thing recently and here's what I found...
public HttpResponseMessage Get([FromUri] string var, [FromUri] string test) {
var retStr = new HttpResponseMessage(HttpStatusCode.OK);
if (var.ToLower() == "getnew" && test.ToLower() == "test") {
retStr.Content = new StringContent("Found Test", System.Text.Encoding.UTF8, "text/plain");
} else {
retStr.Content = new StringContent("Couldn't Find that test", System.Text.Encoding.UTF8, "text/plain");
}
return retStr;
}
So now in your address/URI/...
http(s)://myURL/api/myController/?var=getnew&test=test
Result: "Found Test"
http(s)://myURL/api/myController/?var=getnew&test=anything
Result: "Couldn't Find that test"