send
(since )
Send data to a proxy
Description
string
send
(
string datas )
Send data to a proxy
Parameters
datas
Datas to send to the proxy
Examples
//ape var is a reference to APE instance
ape.start();
var proxy;
ape.addEvent('init', function() {
//Connect to the APE server
proxy = new APE.PipeProxy();
//Connect to ape-project website
proxy.connect('www.ape-project.org', 80);
});
//Send HTTP headers
proxy.write("GET / HTTP1.1\r\nhost: www.ape-project.org\n\n");
ape.addEvent('proxyConnect', function() {
console.log('you are now connected to proxy');
});
//Receive the page content
ape.addEvent('proxyRead', function(data) {
console.log('Receiving data', data);
});
ape.addEvent('proxyClose', function() {
console.log('Proxy closed the connection');
});
User notes
# No comment
Post a note
CollaborAPE to our wiki !
Find the information you need on the APE Official Wiki : Install, Server, JSF, Help...
