Fixed a bug that data argument was undefined
add more APIs to get request/response in Engine