I'm having issues with my JQuery Ajax Call. The response is always null because the callback function is executed before the request to get_friends is completed. Is there anything I'm missing? Thanks in advance.
jQuery(document).ready(function($) {
$('#btn_update').click(function() {
url = '/get_friends/';
$.get(url, {}, function(response){
alert(response);
});
});
});