added ability to pass request and response

Change-Id: Iadd2fcfec3162414090fccafa2de4c1fa93c3e37