I cannot post a simple string value to my WebApi and I get a 415 error. What's the correct syntax to make this happen? Thanks!
createRole(name: string) {
var fullUri = this.baseUri;
fullUri += 'api/role/CreateRole';
return this.http.post(fullUri, name);
}
[HttpPost("CreateRole")]
public async Task<IActionResult> CreateRoleAsync([FromBody]string name)
{
//...
}