// use HTTP based on global Vue object Vue.http.get ('/someurl ', [options]). Then (Successcallback, Errorcallback); Vue.http.post ('/someurl ', [body], [options]). Then (Successcallback, Errorcallback);
// using $http within a Vue instance this. $http. Get ('/someurl ', [options]). Then (Successcallback, errorcallback); this. $http. Post ('/someurl ', [body], [options]). Then (Successcallback, Errorcallback);
// Traditional notation this. $http. Get ('/someurl ', [options]). Then (function(response) { // Response succeeded Callback function(response) { // response error callback });
supported HTTP methods vue-resource's request API is designed in restful style, it provides 7 requests for api:get (URL, [options]) head (URL, [options]) Delete(URL, [options]) Jsonp (URL, [options])post (URL, [body], [options]) put (URL, [body], [ Options]) patch (URL, [body], [options])
More
Http://www.cnblogs.com/axl234/p/5899137.html
Vue Http.get Vue-resource