Vue.js interceptor
How can I use a interceptor in vue.js ? So before every request/response it should first go to the interceptor. I already searched a lot but can't find a good documentation about that. I would like to use JWTAuth like this: (function (define) { 'use strict' define(function (require) { var interceptor interceptor = require('rest/interceptor') /** * Authenticates the request using JWT Authentication * * @param {Client} [client] client to wrap * @param {Object} config * * @returns {Client} */ return interceptor({ request: function (request, config) { var token, headers token = localStorage