I have a need for extracting the response body (for grabbing returned state), but this feel quite wrong to do:
expect(foo, 'to yield exchange', {...})
.then(function (exchange) {
var body = JSON.parse(exchange.httpExchange.response._rawBody.toString('utf-8'));
...
})
There wouldn't be a better way of doing this somewhere?
I have a need for extracting the response body (for grabbing returned state), but this feel quite wrong to do:
There wouldn't be a better way of doing this somewhere?