{"action":"closed","issue":{"url":"https://api.github.com/repos/nolanlawson/pouchdb-authentication/issues/22","labels_url":"https://api.github.com/repos/nolanlawson/pouchdb-authentication/issues/22/labels{/name}","comments_url":"https://api.github.com/repos/nolanlawson/pouchdb-authentication/issues/22/comments","events_url":"https://api.github.com/repos/nolanlawson/pouchdb-authentication/issues/22/events","html_url":"https://github.com/nolanlawson/pouchdb-authentication/issues/22","id":62770530,"number":22,"title":"Cloudant","user":{"login":"ronag","id":3065230,"avatar_url":"https://avatars.githubusercontent.com/u/3065230?v=3","gravatar_id":"","url":"https://api.github.com/users/ronag","html_url":"https://github.com/ronag","followers_url":"https://api.github.com/users/ronag/followers","following_url":"https://api.github.com/users/ronag/following{/other_user}","gists_url":"https://api.github.com/users/ronag/gists{/gist_id}","starred_url":"https://api.github.com/users/ronag/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ronag/subscriptions","organizations_url":"https://api.github.com/users/ronag/orgs","repos_url":"https://api.github.com/users/ronag/repos","events_url":"https://api.github.com/users/ronag/events{/privacy}","received_events_url":"https://api.github.com/users/ronag/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-03-18T18:46:37Z","updated_at":"2015-04-25T18:56:02Z","closed_at":"2015-04-25T18:56:02Z","body":"When trying to login with Cloudant I get the following error: \r\n```\r\nconst remoteDB = new PouchDB('https://foo123.cloudant.com/mydb')\r\nremoteDB.login('fender', 'test123', function(err, response) {\r\n  console.log(err, response)\r\n})\r\n```\r\n```\r\n{message: \"you must specify application/x-www-form-urlencoded as the primary content-type\", status: 400, name: \"bad_request\"\r\n```\r\n\r\nCreating users worked fine.\r\n\r\nHere are the ajax options:\r\n```\r\n{\r\n    \"method\": \"POST\",\r\n    \"url\": \"https://foo123.cloudant.com:/_session\",\r\n    \"body\": {\r\n        \"name\": \"fender\",\r\n        \"password\": \"test123\"\r\n    }\r\n}\r\n```"}}