C#C
C#3y ago
SWEETPONY

❔ What should web api controller return?

I can return Ok with some json as parameter. Or I can return simple string

For example, I have method in controller:
[HttpGet("movies")]
public string GetMovies()
   => "12 angry men";


Is it correct to return just a string?
Was this page helpful?