Home > Blockchain >  Best ways to do POST/GET request from JavaScript
Best ways to do POST/GET request from JavaScript

Time:04-19

I'm learning JavaScript. I want to perform GET and POST request from JavaScript to/from a Django Backend.

I was told that AJAX is outdated, that I should use a framework, like React, Angular or Vue. I'll start to learn React, but first I would like to know if theres a modern/prefered way to perform API request from JavaScript.

In this article "fetch" is mentioned. Could be this the way to go?

CodePudding user response:

You do not need to use a JS Framework to do so, and Javascript has modern features that can help you a lot. In fact, I totally agree with the "fetch" of the article you pined, and I always go for this kind of request if I am in vanilla Javascript.

  • Related