Let grokHeader handle req or res magic.

This makes these functions just a bit more usable without worrying about
direction.