Ensure request.response function exists before response event

Closes #1002