there is something I can't well understand.
When I'm using curl against a freshly raw ASP.NET app with JSON using this command:
curl -X POST -H "Content-Type: application/json" -X POST -d '{"username":"abc","password":"abc"}' https://localhost:5001/api/values --insecure -v
I have a failed response (bad request 400) with the following error:
{"":["Unexpected character encountered while parsing value: {. Path '', line 1, position 1."]}
However... If I copy the json data in a file and call the CURL command as this:
curl -X POST -H "Content-Type: application/json" -X POST -d @user.json https://localhost:5001/api/values --insecure -v
It works just fine.
====> Why/How the hell?
Thanks