I have this function inside the server side action in creating a plugin:
function(properties, context) {
var $ = require("jquery");
var settings = {
"url": "https://api.konnektive.com/order/query/?params",
"method": "GET",
"timeout": 0,
"headers": {
"Content-Type": "application/json"
},
};
$.ajax(settings).done(function (response) {
console.log(response);
});
}
with this node module:
{
"dependencies": {
"jquery": "latest"
}
}
and it’s a simple ajax request to fetch data. But I’m getting the $.ajax
is not a function error which is weird since jquery has ajax by default. Am I missing something here?