Hi,
I have created a Web API and defined the API Controller:
//Post api/<controller> public IEnumerable<siteLogin> Post([FromBody]string siteId, [FromBody]string sitePassword) { List<siteLogin> siteLoginList = new List<siteLogin>(); //Process input... return siteLoginList; }
I'm using Postman to test the API. I can't get the API to accept the parameters I pass. It returns a 500 error each time with no further info. Here is how I'm passing the parameters in using Postman:
Just to test, I removed the parameters in the controller and did a POST without any parameters. It works fine. So there is no issue with connecting to the API.
Is there a problem with my controller definition or the Postman parameters?