Created
September 15, 2013 19:21
-
-
Save auggernaut/6573625 to your computer and use it in GitHub Desktop.
CouchDB cookie auth from client.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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