Skip to content


Subversion checkout URL

You can clone with
Download ZIP


assert.response. second request after response #155

zxcabs opened this Issue · 8 comments

5 participants


node v0.6.1
expresso v0.9.2

How i can do second request using data from first response?

For example, on expresso v0.8.1, i can do this as:

assert.response(server, {
      url: '/',
      method: 'GET'
    }, {
      body: 'Hello World\n',
      status: 200,
      headers: {'Content-Type': 'text/plain'}
   }, function (res) {
      //now i can use res for second request
     assert.response(server, { url: '/foo', data: res.body }, ....); 

But, on expresso v0.9.2 this code drop error:

uncaught undefined: Error: connect ECONNREFUSED
at errnoException (net.js:614:11)
at Object.afterConnect [as oncomplete] (net.js:605:18)

So, how can i do it?


Yes, this problem came after upgrading to node 0.6.1, it wasn't there before that. The same version was running fine with node 0.4.2.


And so, what can me do? Return to node v0.4.x or waiting fix?


Ant idea when expresso will support node 0.6?


I'm adding a plus one to this, I really would like to be able to write more than one assert.response for a given test.


Any news?


I would say, switch to mocha... that is what I did.

There is no assert.response in mocha, but you can include a http library that will do the same thing. I can send you a gist if want to see how I did it.


Thank you for your advice - I will be grateful for gist.


That's my solution - pretty fast switching!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.