Trying to call Vue.http.post gives an error from vue-resource Client
See original GitHub issueI’m trying to call an api using the following code
import Vue from 'vue';
export default {
ready : () => {
Vue.http.post('/my-api', {}).then((response) => {
//success
}, (response) => {
//error
});
}
};
I recieve the following error inside my chrome dev console
TypeError: reqHandlers.pop(...).call is not a function(…)
error @ vue-resource.common.js?2f13:311
(anonymous function) @ vue-resource.common.js?2f13:1152
I tried using this.$http.post but I always the an error telling me that this
is undefined
version : ^0.8.0
Issue Analytics
- State:
- Created 7 years ago
- Comments:6 (2 by maintainers)
Top Results From Across the Web
CORS issue with Vue.js - Stack Overflow
I have a proejct , which contains larvel api and vuejs. Vuej consuming larvel api fine but when call to other api is...
Read more >How to consume APIs with Vuex, Pinia, and Axios
We're using the async/await format to fetch data from the endpoint, and using Axios to make the HTTP request. We'll make a request...
Read more >Vue JS 2 Tutorial #32 - HTTP Requests - YouTube
COURSE LINKS:+ Repo - https://github.com/iamshaunjp/ vuejs -playlist+ Atom editor - https://atom.io/a+ Download GIT - https://git-scm.com/+ ...
Read more >Adding Instance Properties - Vue.js
Let's say you're replacing the now-retired Vue Resource. You really enjoyed accessing request methods through this.$http and you want to do the same...
Read more >Consume Remote API Data Via HTTP In A Vue.js Web ...
Things have only changed slightly between our vue-resource version and our axios version. Now we can call the $http.get and $http.post methods ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
try this:
@steffans is right.when change your interceptor code.the error disappear