Add convenience function to the req and res objects of an http/https server