I have POST method like this
public void PostMethod([FromBody]string param)
{
var test = param;
}
And simple JS script
<script type="text/javascript">
$.ajax({
url: 'http://localhost:8101/sd/Localization/PostMethod',
type: 'POST',
data: {
param: 'test'
}
});
</script>
Ot work great. Ajax call is invoking the method BUT the param is null :/ always. I don`t know why. I can't get it running. Can someone pls help me and show me the correct direction ?
// update
too check something i`ve created new project to be sure that i didn't break something. Even in new project in default config I always get null