Jaxer and HTTP proxy requests...
Posted
by rakhavan
on Stack Overflow
See other posts from Stack Overflow
or by rakhavan
Published on 2010-03-14T04:04:29Z
Indexed on
2010/03/14
4:15 UTC
Read the original article
Hit count: 353
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.
© Stack Overflow or respective owner