pagekit / vue-resource

The HTTP client for Vue.js

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

change the url in Vue.http.interceptors with asynchronous methods

SummerXIAhaha opened this issue · comments

commented

I want change the request url in Vue.http.interceptors;
but with a asynchronous methods;
can i push a promise or async method in Vue.http.interceptors?
how can I do that, please help me!

Vue.http.interceptors.push((request, next) => {
// want change the request url with a async method.how can I get it? like
setTimeout(() => {
request.url = '1111';
}, 50)
})