views:

61

answers:

2

Thanks to everyone in advance.

I'm using Jaxer.sandbox and making requests just fine. I'd like these requests to go through my http proxy (like squid for example). Here is the code I that is currently working for me.

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());
};

How can I send this request through a proxy server?

Thanks,

Reza.

+1  A: 

I didn't get any replies to this. :|

We ended up hacking around this by creating our own custom sandbox.openProxy() method in the jaxer framework. :)

Reza.

rakhavan
This is a really interresting question. Can you publish this custom sandbox.openProxy() method ?
ideotop
A: 

I'll be happy to see your openProxy method too

dincredible