What does HackerNews think of axios?

Promise based HTTP client for the browser and node.js

Language: JavaScript

#70 in Hacktoberfest
#50 in JavaScript
#23 in Node.js
Python's Flask and Dataset libraries + Axios and Vue on the frontend (doesn't even have to be the full build/component/single page application setup, just include it as script and populate the app values with Flasks render_template() parameters)

https://flask.palletsprojects.com/en/2.2.x/quickstart/#a-min...

https://dataset.readthedocs.io/

https://github.com/axios/axios

https://vuejs.org/guide/introduction.html

https://vuejs.org/guide/extras/ways-of-using-vue.html

I've created a boilerplate here:

https://github.com/void4/lazyweb

Yeah... I'm about as far to the other side of this as you can get.

It really looks like the x-html attribute you're complaining about is just using plain old javascript. It takes a statement that resolves to a string, and renders that.

The statement they provided happens to be pretty terrible for docs (I would have just used the built in fetch api, instead of the axios networking library - https://github.com/axios/axios), but it's plain old js regardless.

Your example is some custom fucking DSL that I have NO idea what it's doing. When does it run? how does it handle errors? What is the base url? What happens to the original text? How does it auth? What if I needed to post, or put, or delete? It's an entire fucking language I have to learn on top of the actual css/html/js knowledge required to understand this. In almost all cases, you're better off just learning "plain old javascript" since that skillset travels with you everywhere.

basically: DO NOT MAKE ME LEARN YOUR FUCKING DSL. It's wasted time and effort for me, and learning it provides absolutely zero benefits outside of your library. Further - it will fucking leak, and then you're right back at writing plain old js again, but now you have to understand the intimate details of the library implementing the dsl to tweak the right spots.

Even alpine turns me off a bit here (it's still a dsl, even if most of it reverts to plain old js) - but at least they're incredibly up front about the total time investment to learn the dsl (15 attrs, 6 props, 2 methods). HTMX is like 5 times the size (https://htmx.org/reference/), so I assume roughly 20 times the effort to learn the DSL.

I haven't seen XMLHttpRequest used directly in non-legacy code in quite some time. If there is any battle, it's between fetch and axios[1], and fetch is winning by virtue of being standard. Node.js also decided to implement it.[2]

[1] https://github.com/axios/axios [2] https://blog.logrocket.com/fetch-api-node-js/

Hey, Angular team member here.

The decision to use Observables was made after an extensive discussion. You can follow the thread here https://github.com/angular/angular/issues/5876. If that's an interface that doesn't align with your expectations, you can use fetch and/or wrap it in a service to take advantage of the DI mechanism we provide. Another popular third-party solution is https://github.com/axios/axios.

There's a straightforward way to export components to be used by a third-party app directly via the Angular CLI. If you'd prefer to use a component outside of Angular, we have @angular/elements.

Hope this addresses some of the concerns you had.

bent seems too "bare-bones" for my daily usage. If you like that good for you, but I have been using axios[0] which is more heavy weight.

https://github.com/axios/axios

I've always liked to use axios which provides a jQuery-ish AJAX library. Works in the browser and server-side with NodeJS.

https://github.com/axios/axios

Much nicer to use than fetch IMHO

Currently? I run them on separate ports and use axios[0] to make requests against Buffalo routes. I had to use the github.com/rs/cors[1] package with Buffalo for CORS so that Vue doesn't yell at me. So I run `buffalo dev` in one tmux pane and `yarn dev` in another.

Here is what the inside of the portion of a component may look like: <a href="https://gist.github.com/howdoicomputer/cdadba6e47021ba90b7f753ff72772dd" rel="nofollow">https://gist.github.com/howdoicomputer/cdadba6e47021ba90b7f7...</a><p>And here is the code for adding cors to Buffalo: <a href="https://gist.github.com/howdoicomputer/17366df6cd7b8208a22a879111be9784" rel="nofollow">https://gist.github.com/howdoicomputer/17366df6cd7b8208a22a8...</a> I got that from a PR for pre-app handlers. [2]<p>Eventually, I'll hook everything up to Nginx for deployment.<p>[0] <a href="https://github.com/axios/axios" rel="nofollow"<span class="bg-orange-200 rounded px-1">https://github.com/axios/axios</span></a> [1] <a href="https://github.com/rs/cors" rel="nofollow">https://github.com/rs/cors</a> [2] <a href="https://github.com/gobuffalo/buffalo/issues/609" rel="nofollow">https://github.com/gobuffalo/buffalo/issues/609</a>