I am using IActionResult in Web API Controller and heating method from Postman ,My Functionality is working but not getting success response . My Code is:
[HttpPut]
[Route ("MarkAsInActive")]
public IActionResult MarkAsInActive (Pousada pousada)
{
try
{
var x = Service.MarkAsInActive(pousada.ID, pousada.IsActive);
if (x != null)
{
return Ok(x);
}
else
{
return BadRequest ();
}
}
catch (Exception ex)
{
throw ex;
}
}
Response in Postman is: Could not get any response There was an error connecting to https://localhost:44303/api/Pousada/MarkAsInActive. Why this might have happened: The server couldn't send a response: Ensure that the backend is working properly Self-signed SSL certificates are being blocked: Fix this by turning off 'SSL certificate verification' in Settings > General Proxy configured incorrectly Ensure that proxy is configured correctly in Settings > Proxy Request timeout: Change request timeout in Settings > General
But I want Reponse in Json format as like: { "ID":"43956f24-ddcc-41b1-a29b-71f717c6fb0e", "IsActive":"true" }