Skip to content
This repository has been archived by the owner on Nov 5, 2018. It is now read-only.

Request with no callback does not get its body set in relax #63

Closed
tillre opened this issue Apr 13, 2012 · 4 comments
Closed

Request with no callback does not get its body set in relax #63

tillre opened this issue Apr 13, 2012 · 4 comments
Labels

Comments

@tillre
Copy link

tillre commented Apr 13, 2012

When no callback is passed to relax, the request is sent before the body field is set. When i do a db.insert(doc) without the callback, the doc will not show up in the db, because no data is sent. Is this intended?

@dscape
Copy link
Contributor

dscape commented May 12, 2012

how to replicate

$ NANO_ENV=testing node
$ curl -X PUT localhost:5984/sixtythree
{"ok":true}
var db = require('./nano')('http://localhost:5984/sixtythree')
var foo = db.insert({"foo": "bar"}); foo.on("data", function (chunk) { process.stdout.write(chunk); });

@dscape
Copy link
Contributor

dscape commented May 13, 2012

I'm working on this on a branch called issue63

@dscape
Copy link
Contributor

dscape commented May 13, 2012

This is fixed. I will merge upstream later today and publish a new version of nano 3.0.0

dscape added a commit that referenced this issue May 13, 2012
* fixes issue #63
@dscape dscape closed this as completed May 13, 2012
@tillre
Copy link
Author

tillre commented May 14, 2012

thanks

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants