Skip to content

Instantly share code, notes, and snippets.

@auggernaut
Created September 15, 2013 19:21
Show Gist options
  • Save auggernaut/6573625 to your computer and use it in GitHub Desktop.
Save auggernaut/6573625 to your computer and use it in GitHub Desktop.
CouchDB cookie auth from client.
var params = "name=augman&password=hello";
$.post(this.host + "/db/_session", params, function (res) {
if (JSON.parse(res).ok) {
cb(null, {message: "register success", details: res});
} else {
cb({message: "register failure", details: res}, null);
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment