I've got a new API that I'm building with ASP.NET Core, and I can't get any data POST'ed to an endpoint.
Here's what the endpoint looks like:
[HttpPost] [Route("StudentResults")] public async Task<IActionResult> GetStudentResults([FromBody]List<string> userSocs, [FromBody]int collegeId) { var college = await _collegeService.GetCollegeByID(collegeId); // var occupations = await _laborMarketService.GetOccupationProgramsBySocsAndCollege(userSocs, college); return Ok(); }
And here's what my payload that I'm sending through Postman looks like:
{ "userSocs": [ "291123", "291171", "312021", "291071", "152031", "533011" ], "collegeId": 1 }
I'm making sure that I have postman set as a POST, with Content-Type application/json
. What am I doing wrong?