I have a controller with the following route:
[HttpGet("/{id}/studentrank")]
public async Task<ActionResult> GetStudentRank(Guid id){
...
}
Note, the decorator over the class is: [Route("api/[controller]")]
so it should be called by: api/student/{guid here}/studentrank
This works fine in swagger. However when I call it as follow, I get an internal server error and does not even break in the controller:
var response = await HttpClient.GetAsync($"/api/student/{id}/studentrank");
Any idea of what could be missing?