http-party / node-http-proxy

A full-featured http proxy for node.js
https://github.com/http-party/node-http-proxy
Other
13.92k stars 1.97k forks source link

Documentation for POST methods through a proxy #785

Open NucleaPeon opened 9 years ago

NucleaPeon commented 9 years ago

Much of the documentation I have read has either been using the old api, using express and middleware, or it doesn't work.

I am suggesting producing a small code sample that uses node-http-proxy to re-route a POST request to another address using whatever chunking/buffering/response is simple and straightfoward.

I have read previous bugs on this proxy software and POST and I have not found it useful, personally. I am not familiar enough with node-http-proxy to do it myself or write up a patch. I solved my issue by utilizing the request module for POST and this software for GET.

(I use plain http on nodejs and no middleware in my code.)

This documentation would be greatly appreciated! Thank you.

hatembr commented 8 years ago

Hi, I ended up doing exactly the same thing. Can someone please give a clear example on how to handle POST? Thanks