I am trying to make an HTTP Get REST API that will take 3 parameters. However, I am getting errors or the 3 parameters are not getting passed.
I get a build error - "HttpGetAttribute does not contain a constructor that takes 3 arguments"
Here is the way, I am checking it.
https://localhost:44312/api/test/1/2/3
I have removed the line HttpGet but it doesn't help.
[Route("api/controller/{a}/{b}/{c}")]
[HttpGet("{a}", "{b}", "{c}")]
public string Get(int a, int b, int c){
int sum = a + b + c;
return sum.ToString();
}
I expect the URL to pass these parameters to the REST GET API.