我目前正在服务器端进行经过身份验证的数据提取,如下所示:
HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url);
request.Proxy = new WebProxy("...");
request.UseDefaultCredentials = true;
request.KeepAlive = true;
request.CookieContainer = new CookieContainer();
是否可以使用 jQuery 来做到这一点?
最佳答案
您可以将它放在一个标有[WebMethod]
属性的静态方法中,并从 jQuery 调用它——也就是说,而不是直接通过代理进行调用,您仍会获得客户端异步,但调用仍会通过您的服务器。
关于c# - 经过身份验证的调用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15826586/