fresh
fresh copied to clipboard
Allow passing Request and Response objects
Use headers from http.IncomingMessage / http.OutgoingMessage, while providing backward compatibility.
Also including test cases.
👎 adding a dependency on the http
module for such a trivial thing someone can do in their code is not great; that is a large dependency that can get added in a browserify bundle, for example. If we are going to accept those objects, at least we should only use the public APIs, not private APIs.