node-ironio icon indicating copy to clipboard operation
node-ironio copied to clipboard

Return full response

Open Stephenitis opened this issue 11 years ago • 3 comments

I had a need to process the response headers in the response from a successful post/get request. Callback variables now looks like (err, res, body)

Stephenitis avatar Dec 23 '13 00:12 Stephenitis

Thanks. I'll have time to test this later today.

ahallock avatar Dec 23 '13 16:12 ahallock

A few things:

  1. It breaks 48/50 tests, so I can't merge yet.
  2. It breaks current code out there since the body is being moved one position.

This isn't 1.0 yet, so we can break the current contract, but we should increment to 0.5.0 if we do.

But this change makes sense and is consistent with Request's fn(err, res, body). Can you fix the tests?

Thanks

ahallock avatar Dec 24 '13 03:12 ahallock

cool, this is my first attempted pull on a node module, I'll submit a revised one soon.

On Mon, Dec 23, 2013 at 7:32 PM, Andrew Hallock [email protected]:

A few things:

  1. It breaks 48/50 tests, so I can't merge yet.
  2. It breaks current code out there since the body is being moved one position.

This isn't 1.0 yet, so we can break the current contract, but we should increment this to 0.5.0 if we do. I do think this change makes sense and is consistent with Request's fn(err, res, body).

— Reply to this email directly or view it on GitHubhttps://github.com/ahallock/node-ironio/pull/18#issuecomment-31156837 .

Stephen Nguyen Developer Evangelist, Iron.io http://www.iron.io/ 703-975-5863 | [email protected] http://www.linkedin.com/in/stephenhnguyen/ http://www.github.com/stephenitis http://www.twitter.com/stephenitis

Developers <3 Iron.io! https://twitter.com/getiron/favorites

Stephenitis avatar Dec 24 '13 16:12 Stephenitis