I have POST and I use Postman to test. Amount to url and body in Postman . Now when I test my object on my Controller it comes NULL , and of course it's because I did not do it correctly. What do I have to do? Controller
[Route("api/[controller]")]
public class OptoutClientController : Controller
{
HttpClient client = new HttpClient();
[HttpPost]
public IActionResult Unsubscribe([FromBody]OptOutCliente cliente)
{
return Ok();
}
}
Model
public class OptOutCliente
{
public Int64 Cpf { get; set; }
public String Email { get; set; }
public String Telefone { get; set; }
public String Bandeira { get; set; }
public String Canal { get; set; }
}
Postman Body
{
"Cpf": "128907",
"Email": "[email protected]"
"Telefone": "971418418",
"Bandeira": "CB",
"Canal": "EML"
}
How do I get this gold json side, in my controller?
EDIT1
Postman