如何模拟 WCF REST 服务:
HttpWebResponse 响应;
HttpWebRequest request;
try
{
request = (HttpWebRequest)HttpWebRequest.Create(System.Configuration.ConfigurationManager.AppSettings["TransferUrl"] + "/Download/" + ID1 + "/" + ID2 );
request.Method = "GET";
response = (HttpWebResponse)request.GetResponse();
}
即使在服务中的代码中也可以做到这一点