Can you please help me to pass optional parameters in between in a uri
[Route("api/values/{a}/{b?}/{c?}")]
public string Get(string a = "", string b = "", string c = "")
{
return string.Format("a={0}, b={1}, c={2}", a, b, c);
}
I can call the api -
api/values/abc/pqr/xyz returns a=abc, b=pqr, c=xyz
api/values/abc/pqr returns a=abc, b=pqr, c=
But i would like to call the api like -
api/values/abc//xyz which should return a=abc, b=, c=xyz
returns a=abc, b=xyz, c=
Can anyone help