Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $.ajax({
- type : 'POST',
- url : '/some/url',
- data : JSON.stringify(request),
- headers : { 'content-type' : 'application/json' },
- success : resolve,
- error : () => {
- console.log('There has been an error');
- reject();
- }
- }).done((response) => { //do stuff here
Add Comment
Please, Sign In to add comment