Closed heapwolf closed 13 years ago
hij1nx, basic auth is supported now on master. Is there a need to add custom headers besides auth?
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.
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.
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.
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.
I'd be happy to merge in a pull request for either branch. master is the one in npm.
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.
Ok, breaking changes are ok in the 0.1.0 branch, there are a couple already.
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!