We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4f24664 commit 6a4294cCopy full SHA for 6a4294c
lib/caronte/streams/proxy.js
@@ -29,12 +29,18 @@ ProxyStream.prototype.onFinish = function() {
29
30
}
31
32
-ProxyStream.prototype.onResponse = function() {
33
-
+ProxyStream.prototype.onResponse = function(proxyRes) {
+ this.proxyRes = proxyRes;
34
35
36
-ProxyStream.prototype._read = function() {}
+ProxyStream.prototype._write = function(chunk, encoding, callback) {
37
+ this.proxyReq.write(chunk, encoding, callback);
38
+};
39
+
40
+ProxyStream.prototype._read = function(size) {
41
+ var chunk = (this.proxyRes ? this.proxyRes.read(size) : '') || '';
42
-ProxyStream.prototype._write = function() {}
43
+ this.push(chunk);
44
45
46
require('util').inherits(ForwardStream, Duplex);
0 commit comments