Skip to content

Instantly share code, notes, and snippets.

@egorvinogradov
Created September 14, 2015 21:25
Show Gist options
  • Save egorvinogradov/281b7c3d2cc13847cae8 to your computer and use it in GitHub Desktop.
Save egorvinogradov/281b7c3d2cc13847cae8 to your computer and use it in GitHub Desktop.
function req(data){
$.ajax({
url: 'https://',
method: 'POST',
data: JSON.stringify(data),
contentType: 'application/json',
headers: {
'x-csrftoken': 'xpUoEKTvASGAYOhaFoPy3Boj4aGM4zsF'
},
success: function(data){
console.log('> Data', data);
window._data = data;
},
error: function(){
console.log('> Error');
}
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment