我正在写一个web api调用,除了请求参数之外,我还需要接收额外的参数,例如语言,deviceId等,这是最好的方法吗?
[GET("abc/{type}"), HttpGet]
public HttpResponseMessage GetValues(int type, int page = 1)
{
int totalPages = 0;
var d= Getvalues2(type, Settings.PageSize, page, out totalPages);
if (d == null) { return NotFound();}
return Ok(d)
答案 0 :(得分:0)
使用HTTP POST,而JObject接收额外的参数。