h2non / rocky

Full-featured, middleware-oriented, programmatic HTTP and WebSocket proxy for node.js (deprecated)
MIT License
371 stars 24 forks source link

transformRequest has a gotcha, docs or code fix? #116

Open twinforces opened 6 years ago

twinforces commented 6 years ago

transformRequest only fires if its a method that can have a body. This is misleading, as it's very common to perhaps want to tweak headers or something on an outgoing request before it gets to the destination server.

The solution is "use" instead of "transformRequest", but I was banging my head on this today.