Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

javascript promise with ajax

function doTheThing() {
  $.ajax({
    url: window.location.href,
    type: 'POST',
    data: {
      key: 'value',
    },
    success: function (data) {
      console.log(data)
    },
    error: function (error) {
      console.log(error)
    },
  })
}
Source by www.taniarascia.com #
 
PREVIOUS NEXT
Tagged: #javascript #promise #ajax
ADD COMMENT
Topic
Name
6+5 =