Тёмный

Axios API for JavaScript: GET, POST, PUT and DELETE requests 

OpenJavaScript
Подписаться 10 тыс.
Просмотров 38 тыс.
50% 1

👉 Source code: openjavascript.info/2022/05/0...
⚡ Looking for high-performance, affordable web hosting for your website or app? We use HostWithLove: bit.ly/3V2RM9Q ❤️
This tutorial shows you how to make HTTP requests (GET, POST, PUT and DELETE) using the Axios API in frontend, vanilla JavaScript.
#axios #javascript #vanillajs #httprequest #frontend #webdevelopment #api
🔔 Subscribe for more tutorials just like this: / @openjavascript
⚡ NEW: Web development courses from Meta Inc. ⚡
Front-End Developer Professional Certificate: imp.i384100.net/b3dMek
Back-End Developer Professional Certificate: imp.i384100.net/gbYorg
iOS Developer Professional Certificate: imp.i384100.net/Jr7qj2
Meta Android Developer Professional Certificate: imp.i384100.net/oeYnGo
Meta Database Engineer Professional Certificate: imp.i384100.net/BX7KGB
Website: openjavascript.info
Twitter: / openjavascript

Опубликовано:

 

1 май 2022

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 32   
@OpenJavaScript
@OpenJavaScript Год назад
Thanks for watching! For more on using Axios, see our related blog post: openjavascript.info/2022/05/03/using-axios-to-make-http-requests-get-post-put-delete/
@WewCode
@WewCode Год назад
I have been searching like crazy. This is the 3rd day in a row. and youre video finally helped me! thank you !
@OpenJavaScript
@OpenJavaScript Год назад
So happy to hear that :)
@soumadip_skyy_banerjee
@soumadip_skyy_banerjee 2 года назад
Subscribed mate!
@jayceelewis_
@jayceelewis_ 2 года назад
This was super helpful! Thank you 🙌
@OpenJavaScript
@OpenJavaScript 2 года назад
That's great to hear :)
@edkinge1531
@edkinge1531 11 месяцев назад
Thank you this is so helpful
@killiankavanagh3854
@killiankavanagh3854 Год назад
This helped me solve my problem
@OpenJavaScript
@OpenJavaScript Год назад
Glad to hear it!
@IDMarketer
@IDMarketer 7 месяцев назад
Thank you so much
@user-zc6vc6ss2u
@user-zc6vc6ss2u Год назад
Thanks it was helpful
@OpenJavaScript
@OpenJavaScript Год назад
You're welcome!
@sabuein
@sabuein Год назад
Thank you.
@OpenJavaScript
@OpenJavaScript Год назад
You're welcome!
@jamiearodi7325
@jamiearodi7325 2 года назад
aside from the syntax, is there any advantage it has over using a fetch api?
@OpenJavaScript
@OpenJavaScript 2 года назад
Good question! One potential advantage of Axios is that it handles the status code of the response for you (will trigger catch statement in some cases). With the Fetch API, you have to do this yourself. Though, whether this is an advantage or not is really a matter of personal preference. Axios is also popular because Fetch API was not available in NodeJS for a long time, but this is now changing in recent versions of Node. Just in case you (or anyone else reading) are unfamiliar with handling status codes with Fetch API, I show you how to do that in this video: ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-hOXWY9Ng_KU.html
@dzajakeks5539
@dzajakeks5539 Год назад
What is the keyboard that you are using in this tutorial? PS: If an interviewer asks me about ajax call, can I use Axios?
@OpenJavaScript
@OpenJavaScript Год назад
Laptop keyboard, German key layout. On the second question, yes! Ajax is what you do when you make a HTTP request. Sometimes when people use the term ajax, they are referring to using the XMLHttpRequest object to make a HTTP request. But Ajax is a broader term. You are doing Ajax whenever you make a HTTP request (including with Fetch, Axios or the XMLHttpRequest object). Wikipedia definition: "With Ajax, web applications can send and retrieve data from a server asynchronously (in the background) without interfering with the display and behaviour of the existing page" This is true of all HTTP request techniques.
@dzajakeks5539
@dzajakeks5539 Год назад
@@OpenJavaScript Thank you king! really cool sound coming from laptop tho (:
@OpenJavaScript
@OpenJavaScript Год назад
@@dzajakeks5539 No worries! Yeah, sorry about that. This is one of my earlier videos. I hope that the sound quality has improved in some of my latest videos though :)
@dzajakeks5539
@dzajakeks5539 Год назад
@@OpenJavaScript If it's one person in every video, then hell yeah it improved! But yeah there is quite the difference >>>
@viniciusm.m.7822
@viniciusm.m.7822 2 года назад
At 7:00 why did u use "{ }" to wrap that function?
@OpenJavaScript
@OpenJavaScript 2 года назад
I was just be super careful by wrapping the handleFunction call in function scope. But it isn't actually necessary ;)
@rotr8196
@rotr8196 Год назад
i got require is not defined error, can you help me solve this problem ?
@OpenJavaScript
@OpenJavaScript Год назад
Yes, require only works in the Node.js environment. You need to use import syntax in frontend JavaScript or use an Axios CDN link.
@rotr8196
@rotr8196 Год назад
@@OpenJavaScript thanks, although turns out it's because ver 1.1, people says it has a kind of problem, downgraded to ver 1.0 and everytjings works just fine
@Viralvlogvideos
@Viralvlogvideos Год назад
supporting by subbing you. improve your audio.
@OpenJavaScript
@OpenJavaScript Год назад
Thanks for the support and for the feedback! Is it a particular issue with this video? For example, would you say the audio in the following, my latest video, is any better? ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-JuyUXiPqGEY.html
@m3hdim3hdi
@m3hdim3hdi Год назад
no 1080p?
@OpenJavaScript
@OpenJavaScript Год назад
Will consider it for future vidz. Thanks for the feedback :)
@sayonara3465
@sayonara3465 Год назад
The axios docs not good, its really garbage from my opinion, any library or framework need to clear docs and more explains and examples, i don’t understand the config, in their doc there’s method or something like that called paramsSerializer, this’s function in axios docs, but when im looking into open sources code i find it as an object, which means they did’t explain the library as well
@OpenJavaScript
@OpenJavaScript Год назад
I'm a Fetch person myself and now that it's natively supported in Node, no need for Axios to do GET, POST, PUT and DELETE if you don't like it!
Далее
Axios Crash Course | HTTP Library
42:20
Просмотров 364 тыс.
React Axios API Requests | Axios with React JS Tutorial
38:32
Макс Пэйн - ТРЕШ ОБЗОР на фильм
47:02
5 JavaScript Concepts You HAVE TO KNOW
9:38
Просмотров 1,4 млн
Rest API - Best Practices - Design
15:50
Просмотров 99 тыс.
Sending JavaScript Http Requests with Axios
11:50
Просмотров 170 тыс.
Use Axios with React Hooks for Async-Await Requests
36:01
tRPC, gRPC, GraphQL or REST: when to use what?
10:46
Просмотров 72 тыс.
Learn Fetch API In 6 Minutes
6:35
Просмотров 1,2 млн