Vue-resource vs Axios?

Most of us think vue-resource is deprecated to use as Vue has removed it's recommended ajax request. But in fact, it is not. Vue has only rollback the github to PageKit team as there are obvious library to handle the ajax requests.

So, it's up to us to use any of the available library. But choosing one of them is really hard.

Thus, can anyone please provide a detailed differences between vue-resource vs axios vs fetch api?

Start a personal dev blog on your domain for free and grow your readership.

3.4K+ developers have started their personal blogs on Hashnode in the last one month.

Write in Markdown · Publish articles on custom domain · Gain readership on day zero · Automatic GitHub backup and more

J03's photo

Not exactly sure about the differences, but the fetch API seems simple and straight forward, sufficient for most requests, no?

let url = 'example.com'

fetch (url)
.then (res => res.json ())
.then (doSomethingWithJSON)
.catch (err => console.log (err))

or

let url     = 'example.com'
let headers = new Headers ()
let init    = {
  method:  'GET',
  headers: headers,
  mode:    'cors',
  cache:   'default',
}
fetch (url, init)
.then (res  => res.json ())
.then (doSomethingWithJSON)

Looking briefly at Axios and vue-resource, they both seem identical to the fetch API, so most likely no point in bothering with them unless you get a project that already uses them. I imagine they were created before the fetch API was standardized? Just a guess though. When in doubt, I use the simplest and more likely to be available API.

Other thing to consider is that you don't have to worry about using extra bandwidth if you use the Fetch API, as it's already included in browsers. Worst case scenario is you include a polyfill or transpile it with babel.

Show +2 replies
garth haven's photo

Do you know A bivy bag is a weatherproof shelter that wraps around your sleeping bag. Like a tent, they keep out rain and bugs. For extra protection, they carry durable bottles and keep the water out. Some of them are even made from Gortex, which makes them very waterproof and breathable. For more info reach my site and know How to Camp Without a Tent in 2021.

dailygram.com/index.php/blog/920525/how-to-..

jamessteph's photo

Excellent and nice post,To offer your remark more apparent to other people <a href="thegenuineleather.com/category/red-leather-..">Red Leather jacket</a> you should remark as right on time as could be expected. This will assist you with standing out enough to be noticed of top influencers in your specialty.In my products we sale a puffer jackets it’s a very nice jacket try it your self. .garth haven

LorspiVolvox's photo

The post was very useful for me. The information was useful and interesting for me. I read on the essaysservicesreviews about this. Thanks for the info.

ALI ZAIB's photo

If you choose the right bath robes for you that means you are getting a soft, cozy hug. However, not all bath robes for women for women give safe comfort and softness. A few years ago, the bathrobe gave an ugly look, but today bathrobes are comfy, and you can find stylish and beautiful colors bathrobe. As well at Go saveshop you will not only get your fashion accessories here you can also get Home accessories from your clothing to solar power banks

Jennifer Paulin's photo

I truly welcome this superb post that you have accommodated us. I guarantee this would be valuable for the vast majority of the general population. Also, have a look at our blog Mic-troubleshoot which is also helpful. Follow our blog and enjoy it!!

jamessteph's photo

I think that’s the best List of digital marketing institute thanks to you. There are hundreds of leather jacket brands to choose from. Think about the type of jacket you want, heavy duty motorcycle gear or lightweight luxury, and think about how much you want to spend.<a href=” ![image.png](cdn.hashnode.com/res/hashnode/image/upload/..) > image.png /a

Marjorie Price's photo

Great post, love to read this, thanks and keep it up. We are presenting our profile on fake details generator and this profile showed The user will have the freedom to customize the details generated according to their needs. This is such a useful profile for all of you, so please read it. If you are happy reading this then let us know as a comment.

Mr Shoaib's photo

Vue.js is a progressive JavaScript library for building user interfaces and Axios is a very popular JavaScript library for making HTTP requests. buyingbit.com/heavy-duty-pool-ladder-400-lbs

garth haven's photo

Excellent post. i really like this. Have you know Text-to-speech technology is an auxiliary technology that reads digital text aloud. This is sometimes called "read aloud" technology. With the click of a button or the touch of a finger, TTS can catchwords on a computer or other digital device and convert them into audio.

Jennifer Paulin's photo

Hello i'm jenny i like your post is so informative. You can read my new article about WhatsApp chat so go to the link and read it. If you are also thinking about such fake chatting, then let's have a look at our article [Fake WhatsApp Chat Generator (fakewhatsappchat.viamagus.com )

Jack Payne's photo

Your article has demonstrated your diligent work and experience you have in this field. Splendid work. Simply cherished it Cyberpunk 2077 Samurai Leather Jacket

Cloe master's photo

I liked your post very much, people will get information from this post. We will continue to bring posts in the same way. In this way, we have made a post which is related, if you want to read, you can read it by going to the link. online voicerecorder

Monica B Cole's photo

When it comes to finding the best FPS gaming mouse , you need something that feels good for your grip and offers great performance with your favorite titles. Getting a mouse that feels like it belongs in your hand and has the right feature set and a strong sensor will inevitably improve the flow of your gameplay, the hits you land and the satisfaction you get from scoring those Ws.

Izhar Hussain's photo

Thanks for sharing such beautiful information with us, I hope you will share some more info. Please keep sharing. Also, Visit our Thunder Force Emily Erect Collar Jacket website for more amazing Blogs.

Katie Thomas's photo

Fantastic! I must appreciate your work. Love to read such content that is full of information. Keep sharing more! Kindly Visit Sons Of Anarchy Vest

jamessteph's photo

Very well explained post which is quite helpful for understand Genuinely no matter if someone doesn't understand then its up to other people It would be nice of you if you shared information like this in the future. Independence Day Sale

nicolasb's photo

I'm not sure, i haven't follow this story in the last few month.

But they have deprecated vue-resource because the library cannot be used with server-side rendering and axios offer this possibility.

If you don't want to use server-side rendering on your app, vue-resource can be efficient. Else maybe not, you will need axios

If it can help you ! :)