Thanks all for your help. Much appreciated.
1. I added HTTPClient.AddHeader('Accept', 'application/json');
And outputted the returned message as:
> The returned message is 500 - internal server error.
2. If I remove "Content-Type" and only have "Accept", then I get
> 415 - Unsupported Media Type
{HTTPClient.AddHeader('Content-Type', 'application/json');}
HTTPClient.AddHeader('Accept', 'application/json');
3. In Postman, the only headers I have is:
[{"key":"Content-Type","value":"application/json","description":"","type":"text","enabled":true}]
And the body is just the raw JSON: {"loginid":"user1","password":"12345abc"}
4. The CURL is:
curl --location --request POST 'http://localhost:3000/login' \
--header 'Content-Type: application/json' \
--data-raw '{"loginid":"user1","password":"12345abc"}'
This CURL also works:
curl -v -H "Content-type: application/json" -X POST -d '{"loginid":"user1","password":"12345abc"}' http://localhost:3000/login