Open tommcintyre opened 8 years ago
FYI, I have mock-rest-request@0.0.3. My index.js:60 is actually line 82 in the current version in master. It's the final next()
call in this part of the code:
var mockedResponse = mocks[req.method][req.url];
if (mockedResponse) {
res.writeHead(mockedResponse.responseCode, mockedResponse.headers);
res.write(mockedResponse.body);
res.end();
} else {
next();
}
When my application requests an unregistered endpoint, the mock server crashes:
The mock server doesn't crash when I request an unregistered endpoint using curl; only when called from my app, which uses restling. Perhaps restling closes the connection down more quickly than curl, or something...?