this is my controller route config,
[Produces("application/json")] [Route("/api/[controller]/[action]")] public class PatientsRegistrationController : Controller {.........
my HttpGet method looks like this,
[HttpGet] public async Task<IActionResult> GetPatient([FromBody] KeyValueViewModel model) { if (!ModelState.IsValid) return BadRequest(ModelState); var patient = await repository.GetPatient(long.Parse(model.RequestId)); ..................
I keep receiving this ModelState error,
{"": ["A non-empty request body is required." ] }
Shall I use httpPost instead? or What am I doing wrong here?