Rohit Bajaj
asked on
Convert jquery ajax call to pure javascript
HI,
I am currently using jquery to make an ajax call :
How do i do it.
Thanks
I am currently using jquery to make an ajax call :
$.ajax({
url: url,
type: 'POST',
contentType: 'application/json',
headers: {
'X-hfh': this.data
},
dataType: 'json',
success: function(result) {
$.each(result, function(idx, item) {
mybuddyList.push({
DisplayText: item.name,
JID: item.id,
ImageURL: item.profileImage
});
});
},
error: function() {
console.log("Error");
}
});
I want to get rid of jquery and use only javascript to achieve the same.How do i do it.
Thanks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.