Vue-resource: why the default xhr is async?can i set it sync?

Created on 30 May 2016  路  4Comments  路  Source: pagekit/vue-resource

why the default xhr is async?can i set it sync?
maybe an async option is better

Most helpful comment

Duplicate, see #179

All 4 comments

+1

+1

in /src/http/client/xhr.js it's hard-coded as xhr.open(request.method, _.url(request), true); and I don't know any alternative way to make a xhr request sync except for opening it with a false at 3rd argument.
So maybe you can't turn it to sync for now.

One can set properties to xhr by doing this: Vue.http.get(url, data, params, { xhr: { something} }), the xhr field in options argument will be merged into actual xhr object. But I don't know whether there is a way to make a xhr sync by setting its property.

Duplicate, see #179

Was this page helpful?
0 / 5 - 0 ratings