Not able to call a database rest service with get operation from server code
Hi
I am calling a database service from the server code with GET operation
but i m getting following error :
{ status: 400, headers: { Server: 'nginx', Date: 'Mon, 10 Feb 2014 20:41:08 GMT', 'Content-Type': 'application/json', 'Transfer-Encoding': 'chunked', Connection: 'keep-alive' }, body: { code: 'DBSQ219', description: 'Incorrect query' } }
Given below is my server script snippet :
// Get the response with a given username from the database
var XHRResponse = XHR.send("GET", "https://api.appery.io/rest/1/db/colle...", {
"headers": {
"X-Appery-Database-Id": dbId,
"X-Appery-Master-Key": masterKey
},
"parameters": {
"where": '{"userName": "' + userName + '"}'
Code: Select all
} });
Please let me know if i m using correct syntax or not