Fix for issue #163

Added mocking and recording of request headers