Why is my attempt to upload JSON objects into a Cloudant database resulting in a "400 bad request" error?
pos = {
'lat': position.coords.latitude,
'long' : position.coords.longitude
};
$.ajax({
type: "POST",
url: 'http://03353b2e-7d68-462a-b0ab-d5feeae889fd-bluemix.cloudant.com/locations',
data: pos,
contentType: "application/json",
dataType: 'json'
});