You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When superagent send two requests to one router path with diffrent request's body almost the same time.When the second request is sent while mock is dealing with the first request,the first request's body will be overwriten by the second request's body.
For instance.
mock.get('/test', function(req){
//logic code which costs CPU and long time
console.log(req.body);
//first request : {name:"b"}
//seconde request: {name:"b"}
});
superagent.get('/test').send({name:'a'});
superagent.get('/test').send({name:'b'});
When superagent send two requests to one router path with diffrent request's body almost the same time.When the second request is sent while mock is dealing with the first request,the first request's body will be overwriten by the second request's body.
For instance.
I tried to sovle this problem and it works:
I tried to fix it in this PR
#29
The text was updated successfully, but these errors were encountered: