creationix / couch-client

A minimal CouchDB client that easy and powerful
MIT License
101 stars 9 forks source link

hi tim! #3

Closed heapwolf closed 13 years ago

heapwolf commented 13 years ago

This is a non breaking, backward compatible change. I added a "headers" parameter to the CouchClient function, and some supporting code. This will allow devs to do things such as auth headers etc. Thank you!

candland commented 13 years ago

hij1nx, basic auth is supported now on master. Is there a need to add custom headers besides auth?

heapwolf commented 13 years ago

there was, but i deleted my fork because it was so long ago and i never heard a response, i ended up using another project.

diversario commented 13 years ago

Has this been pulled in? There is a need for custom headers, specifically "Content-Type" header, otherwise it's impossible to upload attachments, such as images.

candland commented 13 years ago

shaisultanov this wasn't pulled in, but I'd merge a pull request. Also check out the 0.1.0 branch as that's undergone a major refactor and might have what you want.

diversario commented 13 years ago

Doesn't seem like it, see here https://github.com/creationix/couch-client/blob/0.1.0/lib/couch-client.js#L55 - that's where Content-Type is hard-coded in.

candland commented 13 years ago

I'd be happy to merge in a pull request for either branch. master is the one in npm.

diversario commented 13 years ago

I'm not sure how to make it a non-breaking change, but I'll try with 0.1.0 branch, since it's not in the npm yet.

candland commented 13 years ago

Ok, breaking changes are ok in the 0.1.0 branch, there are a couple already.