I need to send data, and the url is just “v1 / wave”, and it takes five parameters. I tried this, but it is not working yet:
function request(minLat, minLon, maxLat, maxLon, maxNrOfResults, callback){ $.ajax({ url: 'v1/wave?minLat='+minLat+'&minLong='+minLon+'&maxLat='+maxLat+'&maxLong='+maxLong'+&maxNrOfResults='+maxNrOfResults, type: "GET", success: function (data) { callback(data); if(data.msgCode == LOGIN_SUCCESS){ console.log("request success"); } else if(data.msgCode == LOGIN_FAILED){ console.log("request failed"); } }, error: function(data) { handleRequestError(data); } })
ERROR: Uncaught SyntaxError: Unexpected string in URL string.
source share