问题
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