I have the following JQuery:
$(document).ready(function () {
$("#send").on("click", function () {
$.ajax({
url: 'http://localhost:3484/api/mail/send/',
type: 'POST',
dataType: 'text',
data: '[email protected]'
});
});
});
And the Web API action is:
[Route("api/mail/send"), HttpPost]
public void Send([FromBody]String email) {
}
The action is called but the email is null.
What am I missing?