如何在GET
中使用Silverlight
方法调用restful服务时添加标头值?
答案 0 :(得分:1)
您可以通过ClientHttp创建HttpWebRequest,例如:
var url = new Uri("your url");
var request = (HttpWebRequest)WebRequestCreator.ClientHttp.Create(url);
request.Headers[HttpRequestHeader.Pragma] = "no-cache";
request.Method = "GET";