How to retrieve data from response body when using trigger URL

守給你的承諾、 提交于 2020-01-05 03:01:09

问题


I am using trigger URL to run a test case created on Runscope. In response I am getting only details as shown in Runscope documentation. For eg.

Response Sample data:

{
"data": [], 
"error": null, 
"meta": {"status": "success"}
}

But I need the data in response body retrieved from server for request made.For eg.

{
"Status": "OK",
"Body": [{"userId": 12345,"sessionId": "abcd:1234"}]
}

I am using HttpRequest and HttpResponse for the same.


回答1:


Why don't you use something like this :

https://www.npmjs.com/package/dyson#installation

It is used to mock results via api .



来源:https://stackoverflow.com/questions/27525329/how-to-retrieve-data-from-response-body-when-using-trigger-url

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!