Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagejs
titleGet Some Data
linenumberstrue
collapsetrue
jQuery(document).on("pageshow", "#page_actions", function() {
    jQuery.ajax({
        type: "GET",
        url: 'https://fe-api.actionsteplabs.com/api/rest/actions',
        headers: {'Content-Type': 'application/vnd.api+json', 'Accept': 'application/vnd.api+json', 'Authorization': 'Bearer ' + localStorage.api_access_token}
    })
    .done(function(result) {
        resultObj = jQuery.parseJSON(result);
        jQuery("p#action_list").textalert(resultObj);
    })
    .fail(function(errmsg) {
        jQuery("p#page_error_status").textalert(JSON.stringify(errmsg));
        window.location.href = "#page_error";
    });
});