public void handle(Buffer data) {
System.out.println("Proxying response body:" + data);
req.response().write(data);
}
});
cRes.endHandler(new VoidHandler() {
public void handle() {
req.response().end();
}
});
}
});
cReq.headers().set(req.headers());
cReq.setChunked(true);
req.dataHandler(new Handler<Buffer>() {
public void handle(Buffer data) {
System.out.println("Proxying request body:" + data);
cReq.write(data);
}
});
req.endHandler(new VoidHandler() {
public void handle() {
System.out.println("end of the request");
cReq.end();
}
});