added ability to obtain raw request and response data for debugging