HTTP request with ES6 tagged templates

ES6 template literals are one of my favorite features in es6. A few days ago I saw an open source project on github - htm, there are also hyperHTML and, possibly, several other projects also.And I decided to create such a thing to perform AJAX requests.

By the way, package uses node-fetch for node.js and whatwg-fetch for client javascript

Source in github vaheqelyan/karin

Do you think this is a good idea ?

carbon(3).png

Write your comment…

5 comments

Looks good. But I'm gonna stick with Axios. Even fetch doesn't have all the features of axios.

One or the other day if I need a feature from axios, I'll need to use both right? So I'll stick with axios

Reply to this…

Hashnode is a friendly and inclusive dev community.
Come jump on the bandwagon!

  • 💬 Ask programming questions without being judged

  • 🧠 Stay in the loop and grow your knowledge

  • 🍕 More than 500K developers share programming wisdom here

  • ❤️ Support the growing dev community!

Create my profile

Great. But like above comment. I recommend axios. Cookie, proxy, headers, ...

Reply to this…

I'm not sure I see the benefit. Don't I loose all help from my editors intellisense and code completion if I do it like this? I can already do things like fetch(`http://example.com/info/${user}`)

Reply to this…

Great idea! I'd love to contribute!

Reply to this…