我正在使用GET
方法将某些字符串数据从MVC控制器发送到Web API client.GetAsync
方法,但是当我在该字符串中附加IP address
时,方法调用将不起作用。 / p>
string id;
id = Request.Browser.Browser;
id += "|" + Request.UserHostAddress;
client.BaseAddress = new Uri("http://localhost:1234/");
var responseTask = client.GetAsync("api/" + controllerName + "/" + id);