Use Express JS .all() method: detect which VERB was actually used
I guess you all need is req.method
. And to deal with body, add express.bodyParser()
middleware.
If you just want to pass requests and return the response then you are looking for a proxy.
I'd recommend checking out node-http-proxy. Just load the proxy library, init a proxy, and proxy all requests.