You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -65,37 +65,28 @@ see the [demo](https://github.com./nodejitsu/node-http-proxy/blob/master/demo.js)
65
65
66
66
</pre>
67
67
68
-
### How to proxy requests with a regular http server
69
-
<pre>
70
-
var http = require('http'),
71
-
httpProxy = require('http-proxy');
68
+
### How to proxy requests with latent operations (IO, etc.)
72
69
73
-
// create a regular http server and proxy its handler
74
-
http.createServer(function (req, res){
75
-
var proxy = new httpProxy.HttpProxy;
76
-
proxy.watch(req, res);
77
-
// Put your custom server logic here
78
-
proxy.proxyRequest(9000, 'localhost', req, res);
79
-
}).listen(8001);
70
+
node-http-proxy supports event buffering, that means if an event (like 'data', or 'end') is raised by the incoming request before you have a chance to perform your custom server logic, those events will be captured and re-raised when you later proxy the request. Here's a simple example:
### Why doesn't node-http-proxy have more advanced features like x, y, or z?
90
81
91
82
If you have a suggestion for a feature currently not supported, feel free to open a [support issue](https://github.com./nodejitsu/node-http-proxy/issues). node-http-proxy is designed to just proxy http requests from one server to another, but we will be soon releasing many other complimentary projects that can be used in conjunction with node-http-proxy.
92
83
93
-
<br/><hr/>
84
+
<br/>
94
85
### License
95
86
96
87
(The MIT License)
97
88
98
-
Copyright (c) 2010 Charlie Robbins & Marak Squireshttps://github.com./nodejitsu/
89
+
Copyright (c) 2010 Mikeal Rogers, Charlie Robbins & Marak Squires
99
90
100
91
Permission is hereby granted, free of charge, to any person obtaining
101
92
a copy of this software and associated documentation files (the
@@ -116,4 +107,4 @@ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
116
107
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
117
108
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
0 commit comments