Тёмный

Sending JavaScript Http Requests with Axios 

Academind
Подписаться 913 тыс.
Просмотров 171 тыс.
50% 1

Want to send some background (Ajax) Http requests with JavaScript? Learn how to use Axios for that!
Join the full "JavaScript - The Complete Guide" course: acad.link/js
Exclusive Discount also available for my "Accelerated ES6 Training" Course: acad.link/es6
THIS VIDEO IS PART OF A MINI-SERIES! Check out the other parts:
#1 - Using XMLHttpRequest: www.academind.com/learn/javas...
#2 - Using the fetch() API: www.academind.com/learn/javas...
#3 (this video) - Using Axios: academind.com/learn/javascrip...
Check out all our other courses: academind.com/learn/our-courses
Starting Code for the series: github.com/academind/xhr-fetc...
Starting Code for this video: github.com/academind/xhr-fetc...
Finished Code: github.com/academind/xhr-fetc...
----------
• Go to www.academind.com and subscribe to our newsletter to stay updated and to get exclusive content & discounts
• Follow @maxedapps and @academind_real on Twitter
• Follow @academind_real on Instagram: / academind_real
• Join our Facebook community on / academindchannel
See you in the videos!
----------
Academind is your source for online education in the areas of web development, frontend web development, backend web development, programming, coding and data science! No matter if you are looking for a tutorial, a course, a crash course, an introduction, an online tutorial or any related video, we try our best to offer you the content you are looking for. Our topics include Angular, React, Vue, Html, CSS, JavaScript, TypeScript, Redux, Nuxt.js, RxJs, Bootstrap, Laravel, Node.js, Progressive Web Apps (PWA), Ionic, React Native, Regular Expressions (RegEx), Stencil, Power BI, Amazon Web Services (AWS), Firebase or other topics, make sure to have a look at this channel or at academind.com to find the learning resource of your choice!

Наука

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

 

22 сен 2019

Поделиться:

Ссылка:

Скачать:

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

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 106   
@djpacu
@djpacu 4 года назад
one year + with axios . love it!
@Raghad-mz8el
@Raghad-mz8el 3 года назад
This was extremely helpful. You’re my web development superhero seriously thank you so much
@shachaha
@shachaha 4 года назад
This was really informative. I learned Axios first and was like: Okay, this is how you make Get/Post requests. Fine. But learning about XMLhttpsrequests and fetch and the pain, that can come with it, lets me worship Axios even more and I understood, what Axios actually is doing for me! I love your content. Your the best explainer I have found so far. Keep it up! :)
@leonvanrijswijk8409
@leonvanrijswijk8409 4 года назад
Thanks, this was a really helpfull mini series
@golamrabbiazad
@golamrabbiazad 4 года назад
I think axios is beginner friendly and easy to use than fetch, XMLHttpRequest. Thank you sir, for the mini series. Love it.
@kiana5066
@kiana5066 4 года назад
Actually yes, this was helpful in my project. Thank you so much!
@mosscliffe
@mosscliffe 4 года назад
This guy is very good. Highly recommended. I had no idea where to start in accessing a remote site for data, which I needed to do - and now I have three options. Many thanks
@academind
@academind 4 года назад
Thank you, this really means a lot to me :)
@CodeWithBehram7497
@CodeWithBehram7497 3 месяца назад
4 years old video but taught simply and straight forward❤
@talkohavy
@talkohavy 3 года назад
Great video! I'm trying to convince the people I work with to switch to Axios from fetch, and i'm using your mini-series as a tool to win the debate ;)
@rongliao9255
@rongliao9255 4 года назад
Great tutorial! Love the syntax of Axios!
@rodrigocabral7856
@rodrigocabral7856 8 месяцев назад
everything u need to know about this library. Very good video
@PawanKumar-tu6ti
@PawanKumar-tu6ti 3 года назад
Thanks a ton for this amazing content, and by the way, I love your smile brother, when you smile, it makes me smile with you!
@morigene
@morigene 4 года назад
Very great content. It really touches the point I needed. Thanks keep up
@XnonXte
@XnonXte 9 месяцев назад
Straight into the points, really helpful!
@emmanuelanthonyfermin7853
@emmanuelanthonyfermin7853 3 года назад
A big thanks, you are really good at explaining this in detail
@Sam0_21_
@Sam0_21_ 11 месяцев назад
thank you for the beautiful and simple explanation
@dror-krief
@dror-krief 4 года назад
Thanks for this videos. This video is fantastic!
@saadidrees7791
@saadidrees7791 3 года назад
best video on youtube about axios
@ojarrellpro
@ojarrellpro 4 года назад
Super awesome sir! and so timely for me... thank you!
@ianlimasouza6896
@ianlimasouza6896 2 года назад
is it possible to like this series twice? I would. Dude, THANK YOU
@marcvancauwenberghe7511
@marcvancauwenberghe7511 3 года назад
Great mini series!!!
@arunkutz
@arunkutz 3 года назад
Thank you .. Very helpful video ... Just love the way you explain the usages ... :)
@apenet-
@apenet- 3 года назад
Looks super useful. I find myself writing a lot of error checking when using fetch.
@dhokiarinidh9809
@dhokiarinidh9809 Год назад
Thank you sir, we really appreciate your generosity
@conorbyrne3519
@conorbyrne3519 4 года назад
This video is fantastic! Cheers
@jorgeperalta9780
@jorgeperalta9780 4 года назад
What a great mini-series
@academind
@academind 4 года назад
Thank you Jorge!
@paymankhayree8552
@paymankhayree8552 4 года назад
beyond perfect. I am also doing your angular course on Udemy and it has already been a great help
@academind
@academind 4 года назад
Thanks so much Payman!
@TeoAlmonte
@TeoAlmonte 4 года назад
Great mini series! always enjoy going back to basics and getting a refresher. Very well explained.
@academind
@academind 4 года назад
Happy to read that you like it Teo, thank you :)
@101appsCoZa
@101appsCoZa 4 года назад
Great tutorial. thanks!
@robilaqaiser1984
@robilaqaiser1984 4 года назад
Thnx sir for such a great tutorials
@VKD007
@VKD007 4 года назад
i forgot how to use axios thanks for revision man
@greenshaheen6716
@greenshaheen6716 4 года назад
U r an awesome instructor !!
@academind
@academind 4 года назад
Thank you so much :)
@germanmartirosyan6230
@germanmartirosyan6230 4 года назад
Thanks for this videos, i had a question what to use, now i get an answer)
@hleet
@hleet 4 года назад
thx for this video ! very helpful
@MOGE_
@MOGE_ Год назад
Whenever I get mad at Axios, I will remember this video and the amount of pain it is saving me from.
@bibasniba1832
@bibasniba1832 3 года назад
Thank you Mister!
@InsEngineered
@InsEngineered 3 года назад
This was a much-needed comparison. If possible can you also make content regarding CORS proxy?
@codingcomponents
@codingcomponents 4 года назад
Thank you so much, it's really helpful. May God give you more success in your life. :-)
@mertsevtekin1287
@mertsevtekin1287 3 года назад
Great video!
@mayarjaba6731
@mayarjaba6731 Год назад
what a leason♥ thanks you♥♥
@samayunmiahchowdhury794
@samayunmiahchowdhury794 4 года назад
Deserves 1 crore love react ...
@ivanshoshkov
@ivanshoshkov 2 года назад
I have Max's react course and it wonderfull! I highly recommend it.
@JorgeGiro
@JorgeGiro 4 года назад
Thank you for the very good tutorials. Axios is on average 8 to 9 times slower than the other 2 methods.
@sonnybrown4758
@sonnybrown4758 2 года назад
Where did you hear that? I’d really like to know.
@ariel._.9186
@ariel._.9186 2 года назад
thanks, now, i know why i have to use axios
@Lbmaniak
@Lbmaniak 4 года назад
Usefully video
@JoeWong81
@JoeWong81 4 года назад
ACADEMIND RULES!!!
@MontyKsycki
@MontyKsycki 4 года назад
Thank You!!! :) Have a Great Day!! Enjoy ~ Peace :)
@00el04
@00el04 3 года назад
Thank you!
@SwapnilLonkar
@SwapnilLonkar 3 года назад
Really helpfull. Thanks ✌
@markbogdan2
@markbogdan2 3 года назад
Wonderful video. It explains a lot about axios and helped me a lot in my project. I have one question though. On all major sites most of the requests to the APIs are not visible in the network tab. Is this possible with axios, or is there another method?
@mooodddy1
@mooodddy1 4 года назад
Thanks, this was a really helpfull Please max explain http2 ?
@_renamed_
@_renamed_ 3 года назад
thanks for this video, can you show how to use chaining in get requests?
@kazeemodutola9617
@kazeemodutola9617 3 года назад
Thank you for this tutorial! How can we handle file upload, through axios ?
@talkohavy
@talkohavy 3 года назад
Question: What if I want to use Axios, but also use the "await", rather than ".then" and ".catch". Is there a way to catch the error then?
@user-iu5vm7qh6k
@user-iu5vm7qh6k 4 года назад
Searching for aoxis api and found this and found u are Maximiliam I just registered ur react course on udemy!! What a surprise! Will react js need to use aoxis api?
@dimitrisandroid6483
@dimitrisandroid6483 4 года назад
Thank you !!!
@sky_kryst
@sky_kryst 4 года назад
Hey I've completed your reactjs course on udemy and came to know about Meteorjs from another site. Just wanted to ask when will you talking about it? Explain what it is and how well does it go with react?
@bessamlegrand
@bessamlegrand 3 года назад
Max i love you brother
@AlThePal78
@AlThePal78 3 года назад
I would have liked to see axios with async
@aniketgupta6505
@aniketgupta6505 4 года назад
I got an error origin '127.0.0.1:5500' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
@ioannisme7495
@ioannisme7495 4 года назад
i love axios
@miguelarly
@miguelarly 4 года назад
Excellent!! Where did you get the page showed at 2:25?
@kisoresubburaman7945
@kisoresubburaman7945 4 года назад
Sir!! please do video for React360
@AstroSardaukar
@AstroSardaukar 4 года назад
Not a single thumb down? I was almost tempted to give the first! :)
@academind
@academind 4 года назад
Very happy to get such an incredible feedback, please don't be the first with the thumb down here ;)
@anuj7286
@anuj7286 3 года назад
Sir i am little confused which one should i use Axios, fetch api or asynchronous function to get data and post data?
@tdK85
@tdK85 4 года назад
Hey, could you help me? I'm trying to calling an API Post with a huge object in the body. Getting your example as a example, I need to declare each parameter of my object in the body of Axios? Thanks
@sanyuktakate4099
@sanyuktakate4099 4 года назад
How to solve the 401 unathorized error? Do I need to use tokens generated from the server side that I need to pass into the header?
@albertchung7641
@albertchung7641 4 года назад
Hello, how come I can't use the `import * as axios from axios` syntax with Node? ES6 import isn't natively supported yet?
@vincesanchez7790
@vincesanchez7790 4 года назад
Use Axios in all projects cause it supports all browsers
@alihusham1560
@alihusham1560 3 года назад
when i dot axios.post() , i get new element with only _id, without the data that I specified?
@vikasswamy3498
@vikasswamy3498 2 года назад
I have an array with values like usernames .. can we make axios get request on a condition ie., get data from url where username matches to our array values
@keys3340
@keys3340 3 года назад
Sir .. i can't access the axios object in my js file even i do the same as you in the importation of the unpkg link ?? am i missing something
@ahtshamrao7083
@ahtshamrao7083 4 года назад
hay will you please tell us how to disable ssl cert error in axios. api that I'm trying to get data from has ssl enable on it and when i hit tha api from axios it says ssl cert error.
@coderlicious6565
@coderlicious6565 6 месяцев назад
The one thing that drove me nuts with fetch is that it's almost impossible to run a post on your backend api ( php in my case ) and then get back the response ( a specific error message that I return from my php backend function ). With jquery $.post never had a problem, but of course jquery is old.. so I need to learn to use axios.
@projectxny
@projectxny 4 года назад
Finally..
@nikosspiropoulos8417
@nikosspiropoulos8417 4 года назад
why the data on the api included the id and not the email and the password you posted? cannot understand it
@ridwanhaqi6834
@ridwanhaqi6834 2 года назад
i wonder how to catch error from validator of laravel api
@jorgedavalos5663
@jorgedavalos5663 2 года назад
any one knows, why a response from an update, only show for less than a second on the console? im sending from express a mysql affectedrow message converted to json, but, once it gets to the frontend, it's only display for less than a second. =(
@syrine5560
@syrine5560 3 года назад
is it possible to use axios to create a video chat app?
@rainbow-jw3og
@rainbow-jw3og 3 года назад
i need example for send for post body please
@bahaaaldeen9611
@bahaaaldeen9611 Год назад
awesome
@drarxonwarlock9874
@drarxonwarlock9874 4 года назад
Could you do a video "10 things a webdeveloper should know" or something similar to this or do you already have some kind of videos like that?
@academind
@academind 4 года назад
This might be what you're looking for => academind.com/learn/web-dev/how-to-become-a-better-web-developer/
@GAMEPOTA
@GAMEPOTA 3 года назад
How about sending an objects list?
@mv8167
@mv8167 2 года назад
Can we pull the API (json format) execution time from Axios?
@Cdswjp
@Cdswjp 2 года назад
Hello. Can you please help me. I need to upload a file of source code. The source code is already compressed, and I want to upload it compressed, as it already is, to the server. I'm in the process of trying to figuring which headers (& their respective values) I must set on client side, & which ones I must set at server. I want to send the zipped file to the server & get it back from the server zipped also. I believe these are the only headers I will need to choose from: Content-Type, Accept-Encoding, Content-Encoding, Accept-Type I just need to configure them correctly, then I am done. Cheers.
@dzun_nn
@dzun_nn 4 года назад
may I request for axios with svelte ?
@simonx3088
@simonx3088 4 года назад
CROS problem get me crazy ,pls !help me!
@dell4559
@dell4559 2 года назад
Can anyone please help me how to get single data from get request Means /posts/1 where 1 can be 2 3 ... passing a variable and works according to the id ?? Please help me I am in real trouble I need to submit my project this week
@BryanChance
@BryanChance 2 года назад
XMLHttpRequest is fine. I don’t see why so many wrappers and wrappers of the wrapper. It actually makes code harder to understand when there are many hidden or behind the scene “magic”. I load up a single webpage and it uses gobs of memory. People are so spoiled these days. LOL
@manuelfleri88
@manuelfleri88 4 года назад
Would it be possible to know which IDE are you using for these videos?
@academind
@academind 4 года назад
I use Visual Studio Code.
@manuelfleri88
@manuelfleri88 4 года назад
@@academind Thank you very much!
@RahulKumar-rk1tf
@RahulKumar-rk1tf 4 года назад
Any suggestions for jQuery AJAX?
@robbradley1337
@robbradley1337 4 года назад
Re gister lol
@smacksmashen
@smacksmashen 4 года назад
"Mini-serious" 😄
@daniyaltayyab2379
@daniyaltayyab2379 Год назад
waste of time dont watch it
@fieryninja2374
@fieryninja2374 11 месяцев назад
I am using a react app and I always get thrown an AxiosError with this piece of code: ``` const { mutate, data, isError, error } = useMutation({ mutationFn: (params: UserRegisterType) => { return axios .post("/api/auth/register", params) .then((res) => res.data); } }); ``` I am using tanstack query so it can handle error states, loading states, and more. But I tried it without tanstack and the issue still persists. ``` axios.post("/api/auth/register", params) .then((res) => res.data); ``` I am sure this is correct but I still get the error. Also I know it is not the url because when I check the console it shows the url of the api and because I am hosting my app locally it is localhost:3000/api/auth/register. Any help will be appriciated
@juhandvan
@juhandvan 4 года назад
Thanks, this was a really helpfull mini series
Далее
Sending JavaScript Http Requests with XMLHttpRequest
18:53
Axios Crash Course | HTTP Library
42:20
Просмотров 364 тыс.
КАКОЙ У ТЕБЯ ЛЮБИМЫЙ МАРМЕЛАД?
00:40
You don't need a frontend framework
15:45
Просмотров 108 тыс.
tRPC, gRPC, GraphQL or REST: when to use what?
10:46
Просмотров 71 тыс.
Enums considered harmful
9:23
Просмотров 196 тыс.
Sending JavaScript Http Requests with the fetch() API
16:50
The Async Await Episode I Promised
12:04
Просмотров 1,1 млн
Learn JSON in 10 Minutes
12:00
Просмотров 3,1 млн
HTTP Crash Course & Exploration
38:30
Просмотров 1 млн
OZON РАЗБИЛИ 3 КОМПЬЮТЕРА
0:57
Просмотров 30 тыс.