I have an issue where I am trying to retrieve an object from the database to a website.
codevar s_name = $('#sourceName').text();
var s_id = $('#sourcePasscode').text();
$.ajax({
url: 'https://api.appery.io/rest/1/db/collections/source?where={"source_name":"'+s_name+'", "_id" : "'+s_id+'"}',
beforeSend: function(xhr) {
xhr.setRequestHeader("X-Appery-Database-Id", "529****************d");
},
success: function(data) {
console.log(data);
}
}); /code
There is something incorrect about the call, as I keep getting 400 errors about 'bad request'.
Any ideas on how to fix this ? Thanks