I have a web API Get action that uses a class to capture parameters:
public class MyController : ApiController
public IHttpActionResult GetOne([FromUri] OneRequest request)
return Ok(new OneResponse());
I have to use [FromUri] for the parameter because if I don't, web API will look for parameters in the body of the request. I thought HTTP get is supposed to not have a body?
I think that the attribute [HttpGet] is enough to indicate to web API to look for parameters in query string.
What do you think?