I have a simple controller:
[HttpPost("/api/LogError")]
public void LogError(string msg)
{
}
and javascript:
fetch('/api/LogError', {
method: 'POST',
body: JSON.stringify({
'msg': tx
})
})
this doesn't work. How should I properly pass a parameter?