public async Task <ActionResult <TextFile> > Post([FromBody] string text) { //do something var textFile = await _textService.AddFile(text); return(new OkObjectResult(textFile)); }
public async Task <TextFile> Post([FromForm] string text) { return(await TextService.AddFile(text)); }