jshttp / fresh

HTTP request freshness testing
MIT License
161 stars 28 forks source link

Eventually support IncomingMessage/OutgoingMessage #15

Open dougwilson opened 9 years ago

dougwilson commented 9 years ago

Right now the signature is fresh(reqHeaders, resHeaders), which is of course nice for being agnostic, but slightly lame. I don't think we should remove this "agnostic-ness" per-se, but it would be nice to pass in IncomigMessage and OutgoingMessage objects so this lib can just handle weirdness like https://github.com/strongloop/express/pull/2468

dougwilson commented 9 years ago

We can also move the statusCode and method checking or whatever in here as well if this happens, similar to type-is does with hasBody to make it easier to conform to HTTP specs.