我有一个 Web API,它将接收来自“路由 URL”和“请求正文”的输入。
例子:
http://mysite/api/GetIds/85/5
{
"ids":["1234","1234","1234","1234","1234","1234","1234","1234","1234","1234","1234","1234","1234","1234","1234","1234","1234","1234","1234"]
}
那么这是更好的方法吗?我知道我可以将路由值放在请求对象中……但该对象是公共对象。所以我不想改变它。无论如何,我只想知道它是否正确?
提前致谢...