fix failure when running with NODE_DEBUG=request, and a test for that

Just adding a missing require from the refactor. 

I can extend the test to shut up the noise to stderr and assert that something reasonable is returned, if that's of interest.