Jaxer和HTTP代理请求

问题描述:

感谢大家提前。Jaxer和HTTP代理请求

我使用Jaxer.sandbox并提出请求就好了。我希望这些请求通过我的http代理(例如鱿鱼)。这是我目前为我工作的代码。

window.onload = function() { 
//the url to scrape 
var url = "http://www.cnn.com/"; 

//our sandboxed browser 
var sandbox = new Jaxer.Sandbox(); 

//open optons 
var openOptions = new Jaxer.Sandbox.OpenOptions(); 
openOptions.allowJavaScript = false; 
openOptions.allowMetaRedirects = false; 
openOptions.allowSubFrames = false; 
openOptions.allowSubFrames = false; 
openOptions.onload = function() { 
    //do something onload 
}; 

//make the call 
sandbox.open(url, null, openOptions); 

//write the response 
Jaxer.response.setContents(sandbox.toHTML()); 
}; 

如何通过代理服务器发送此请求?

谢谢,

礼萨。

我没有得到任何答复。 :|

我们最终通过在jaxer框架中创建了自己的自定义sandbox.openProxy()方法来解决这个问题。 :)

Reza。

+0

这是一个真正有问题的问题。你能发布这个自定义的sandbox.openProxy()方法吗? – ideotop 2010-04-30 15:22:57