I have this LoansController for a web api
LoansController
[Route(\"api/[controller]\")] [ApiController] public class LoansController : ControllerBase { // G
Try to add headers
$url = 'http://localhost:1113/api/loans' $head = @{'ContentType'='Application/json'} Invoke-WebRequest -Uri $url -Body $postParams -Method Post -Headers $head