Questions tagged [vue-resource]

An HTTP client plugin for Vue.js to manage web requests and responses using XMLHttpRequests or JSONP

vue-resource

vue-resource is an HTTP client plugin for Vue.js to manage web requests and responses using XMLHttpRequests or JSONP.

Features of the plugin (see README):

  • Supports the Promise API and URI Templates
  • Supports interceptors for request and response
  • Supports latest Firefox, Chrome, Safari, Opera and IE9+
  • Supports Vue 1.0 & Vue 2.0
  • Compact size 14KB (5.3KB gzipped)

vue-resource is no longer part of the official recommendation list from Vue, Though it still functions as intended and is usable.

"Potential reasons to migrate away include maintenance, universal/isomorphic support and more advanced features. - Vue JS Core Team

Resources

Related Tags

403 questions
3
votes
1 answer

401 unauthorized github api

Im trying to authenticate to github via a github api in vue js but it returns a 401 unauthorized error,any ideas sendDetails(e){ e.preventDefault(); let that=this; var b=that.username+':'+that.password; var…
Cliff Ireri
  • 47
  • 1
  • 7
3
votes
2 answers

Fetching API data on localhost with VueJS

So this is my function, really simple: mounted: function(){ this.$http.get('http://localhost:80/gaming/api/game/1').then((data)=>{ console.log(data.body); }); } My VueJS app runs on port 8080, and my PHP runs on XAMPP on…
Nir Tzezana
  • 2,275
  • 3
  • 33
  • 56
3
votes
0 answers

Nuxt js how to use the vue-resource to get jsonp?

You need to get a jsonp and put them in store Vuex, how to do it if in how to do it if you can not use the fetch not this import { mapState, mapGetters } from 'vuex' export default { fetch ({ store, params }) { var self = this …
Zero
  • 31
  • 6
3
votes
1 answer

Vue resource - dynamically determine http method

I would like to dynamically determine the appropriate http method and make a single api call. However an exception is thrown when I call the method. I expect that I am doing something wrong rather than this being a vue-resource bug. Would anyone…
pymarco
  • 7,807
  • 4
  • 29
  • 40
3
votes
6 answers

can't access vue resource inside action vuex

hey guys i am trying to do a request inside my action on the vuex side, and i get this error: Cannot read property '$http' of undefined i set my vue-resource this way inside my main.js file: import Vue from 'vue' import VueResource from…
Filipe Costa
  • 545
  • 3
  • 12
  • 32
3
votes
1 answer

Sending HTTP Request Recursively on VueJS

I've checked many places to do that.However, not found any solution about it. Let's suppose, we have got HTTP post request in any method. I am trying to call HTTP post request recursively. The issue is, when I tried to do it with setInterval…
bl4cksta
  • 794
  • 12
  • 32
3
votes
1 answer

Cancel all http requests of previous component once the route is changed

I am using Vue2 and vue-resource in which I am using an interceptor to show the pre-loader. If there are any requests which are not resolved the loader shows up. Following is the code: