This repository has been archived by the owner on Dec 1, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Setting root does not take effect #741
Comments
Supplementary explanation: main.js import Vue from 'vue'
import App from './App.vue'
import VueResource from 'vue-resource';
Vue.use(VueResource);
Vue.config.productionTip = false;
new Vue({
http: {
root: 'http://google.com'
},
render: h => h(App),
}).$mount('#app'); App.vue <template>
<div id="app">
F12 for test
<button v-on:click="onLoad">click me</button>
</div>
</template>
<script>
export default {
name: 'App',
methods: {
onLoad: function () {
this.$http.get('test');
}
}
}
</script> |
Setting |
I checked most of the issues. This is always a problem. This package does not seem to be maintained and updated. I will use other packages as an alternative. |
Do you intend to use axios instead?
I hit this problem doing Max Schwarzmueller's Vue.js course on Udemy.
…On Mon, 13 Apr 2020 at 20:19, noecs ***@***.***> wrote:
I checked most of the issues. This is always a problem. This package does
not seem to be maintained and updated. I will use other packages as an
alternative.
@IanT8 <https://github.com/IanT8>
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#741 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAMYL73QZ424L25Z2MJOKD3RMLRLDANCNFSM4MGYNL4Q>
.
|
Yes, I think I will encapsulate an axios that I use. Although it is not elegant and independent of vue, it should be very effective. |
@IanT8 I didn't understand the links you provided. Unable to open the link. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I use the following code, root does not take effect.
The text was updated successfully, but these errors were encountered: