For some reason when request is sent through Swagger it goes through without any issues
But when I try to do the same thing with powershell I get 400
curl -Method Post -Uri "http://localhost:32774/WeatherForecast" -Headers @{ accept = '*/*';"Content-Type" ="application/json" } -Body "test"
What can I do to fix it?
2
Answers
Sending post though Powershell curl
This comment is the answer. What I was missing were quotes in body. I wish I could mark the comment as answer.
Try