adamfowleruk / mljs

MarkLogic REST API JavaScript wrapper for NodeJS and Browser Apps
http://adamfowleruk.github.io/mljs/apidocs/core/tutorial-all.html
Other
33 stars 19 forks source link

New node version and content-type fix #33

Closed spig closed 11 years ago

spig commented 11 years ago

I updated my repo to use a later version of node.js. The streamReadable class changed in node 0.10 and requires calling the read() function or using the previous 'data' event handler. I opted for the new 'readable' handler and the read() function.

I also only send "Content-type" on non-GET requests. I added "Accept" for application/json and that got me past a problem where xml was being returned instead of JSON on a GET request.

I don't know if you want to, but since the nodejs version is moving I imagine that you might want to update the version of mldb as well.

Let me know if you have any questions or if I'm misunderstanding something.

Thanks Steve

adamfowleruk commented 11 years ago

Manually merged all changes. Did this without forcing upgrade to 0.10.0, but should work with 0.10.0. Tests ran and completed successfully.