I can call every webApi
methods by ajax request but I can't do it by c#.
this is a simple web api which every body can create it in asp.net mvc web api but I can't find any example about call and get it programmatically by c#.
public class TestController : ApiController
{
// GET: api/Test
public IEnumerable<string> Get()
{
return new string[] { "value1", "value2" };
}
}
please some body say me how can I call this web api method in c# and get these 2 values. how can we get value from a web service(RestFull
-without reference) in c# ?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…