Skip to content
This repository was archived by the owner on Jan 30, 2023. It is now read-only.

v2.1.0

Compare
Choose a tag to compare
@alexlafroscia alexlafroscia released this 25 Apr 02:01
· 239 commits to master since this release

Changelog

What's new?

  • There is now an isAjaxError helper function that can be used to detect any kind of error inside of an error handler

    this.get('ajax').request('/foo')
        .then(function(data) {
            // ...
        })
        .catch(function(error) {
            if (isNotFoundError(error)) {
              // handle 404 errors here
              return;
            }
    
            if (isForbiddenError(error)) {
              // handle 403 errors here
              return;
            }
    
            if(isAjaxError(error)) {
              // handle all other AjaxErrors here
              return;
            }
    
            // other errors are handled elsewhere
            throw error;
        });
  • You can now use .delete('/foo') to make an HTTP DELETE request to an endpoint

  • Basic Fastboot support has been added by swapping out jQuery.ajax for najax when the Fastboot environment is detected

  • Documentation improvements