Sending JavaScript Http Requests with Axios

แชร์
ฝัง
  • เผยแพร่เมื่อ 22 ธ.ค. 2024

ความคิดเห็น • 107

  • @shachaha
    @shachaha 4 ปีที่แล้ว +12

    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! :)

  • @golamrabbiazad
    @golamrabbiazad 5 ปีที่แล้ว +31

    I think axios is beginner friendly and easy to use than fetch, XMLHttpRequest. Thank you sir, for the mini series. Love it.

  • @djpacu
    @djpacu 5 ปีที่แล้ว +12

    one year + with axios . love it!

  • @mosscliffe
    @mosscliffe 5 ปีที่แล้ว +1

    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  5 ปีที่แล้ว +1

      Thank you, this really means a lot to me :)

  • @Raghad-mz8el
    @Raghad-mz8el 4 ปีที่แล้ว +8

    This was extremely helpful. You’re my web development superhero seriously thank you so much

  • @leonvanrijswijk8409
    @leonvanrijswijk8409 5 ปีที่แล้ว +36

    Thanks, this was a really helpfull mini series

  • @CodeWithBehram7497
    @CodeWithBehram7497 9 หลายเดือนก่อน

    4 years old video but taught simply and straight forward❤

  • @talkohavy
    @talkohavy 3 ปีที่แล้ว +2

    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 ;)

  • @saadidrees7791
    @saadidrees7791 3 ปีที่แล้ว

    best video on youtube about axios

  • @MOGE_
    @MOGE_ ปีที่แล้ว

    Whenever I get mad at Axios, I will remember this video and the amount of pain it is saving me from.

  • @aniketgupta6505
    @aniketgupta6505 4 ปีที่แล้ว +2

    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.

  • @TeoAlmonte
    @TeoAlmonte 5 ปีที่แล้ว +1

    Great mini series! always enjoy going back to basics and getting a refresher. Very well explained.

    • @academind
      @academind  5 ปีที่แล้ว +1

      Happy to read that you like it Teo, thank you :)

  • @ianlimasouza6896
    @ianlimasouza6896 3 ปีที่แล้ว

    is it possible to like this series twice? I would. Dude, THANK YOU

  • @rodrigocabral7856
    @rodrigocabral7856 ปีที่แล้ว

    everything u need to know about this library. Very good video

  • @kiana5066
    @kiana5066 5 ปีที่แล้ว +3

    Actually yes, this was helpful in my project. Thank you so much!

  • @talkohavy
    @talkohavy 3 ปีที่แล้ว +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?

  • @XnonXte
    @XnonXte ปีที่แล้ว

    Straight into the points, really helpful!

  • @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!

  • @jorgeperalta9780
    @jorgeperalta9780 5 ปีที่แล้ว

    What a great mini-series

    • @academind
      @academind  5 ปีที่แล้ว

      Thank you Jorge!

  • @paymankhayree8552
    @paymankhayree8552 5 ปีที่แล้ว +1

    beyond perfect. I am also doing your angular course on Udemy and it has already been a great help

    • @academind
      @academind  5 ปีที่แล้ว

      Thanks so much Payman!

  • @miguelarly
    @miguelarly 4 ปีที่แล้ว

    Excellent!! Where did you get the page showed at 2:25?

  • @marcvancauwenberghe7511
    @marcvancauwenberghe7511 3 ปีที่แล้ว

    Great mini series!!!

  • @apenet-
    @apenet- 4 ปีที่แล้ว

    Looks super useful. I find myself writing a lot of error checking when using fetch.

  • @Sam0_21_
    @Sam0_21_ ปีที่แล้ว

    thank you for the beautiful and simple explanation

  • @kazeemodutola9617
    @kazeemodutola9617 4 ปีที่แล้ว +1

    Thank you for this tutorial! How can we handle file upload, through axios ?

  • @rongliao9255
    @rongliao9255 5 ปีที่แล้ว

    Great tutorial! Love the syntax of Axios!

  • @morigene
    @morigene 4 ปีที่แล้ว +1

    Very great content. It really touches the point I needed. Thanks keep up

  • @dhokiarinidh9809
    @dhokiarinidh9809 ปีที่แล้ว

    Thank you sir, we really appreciate your generosity

  • @emmanuelanthonyfermin7853
    @emmanuelanthonyfermin7853 3 ปีที่แล้ว

    A big thanks, you are really good at explaining this in detail

  • @coderlicious6565
    @coderlicious6565 ปีที่แล้ว

    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.

  • @dror-krief
    @dror-krief 5 ปีที่แล้ว +1

    Thanks for this videos.
    This video is fantastic!

  • @jorgedavalos5663
    @jorgedavalos5663 3 ปีที่แล้ว

    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. =(

  • @6ocram
    @6ocram 3 หลายเดือนก่อน

    You are a great teacher! Thanks fro the videos

  • @markbogdan2
    @markbogdan2 4 ปีที่แล้ว +1

    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?

  • @InsEngineered
    @InsEngineered 4 ปีที่แล้ว

    This was a much-needed comparison. If possible can you also make content regarding CORS proxy?

  • @_renamed_
    @_renamed_ 4 ปีที่แล้ว

    thanks for this video, can you show how to use chaining in get requests?

  • @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

  • @ojarrellpro
    @ojarrellpro 4 ปีที่แล้ว

    Super awesome sir! and so timely for me... thank you!

  • @alihusham1560
    @alihusham1560 4 ปีที่แล้ว

    when i dot axios.post() , i get new element with only _id, without the data that I specified?

  • @conorbyrne3519
    @conorbyrne3519 5 ปีที่แล้ว

    This video is fantastic! Cheers

  • @keys3340
    @keys3340 4 ปีที่แล้ว

    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

  • @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 3 ปีที่แล้ว

      Where did you hear that? I’d really like to know.

  • @mv8167
    @mv8167 3 ปีที่แล้ว

    Can we pull the API (json format) execution time from Axios?

  • @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?

  • @sky_kryst
    @sky_kryst 5 ปีที่แล้ว

    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?

  • @albertchung7641
    @albertchung7641 5 ปีที่แล้ว

    Hello, how come I can't use the `import * as axios from axios` syntax with Node? ES6 import isn't natively supported yet?

  • @vikasswamy3498
    @vikasswamy3498 3 ปีที่แล้ว

    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

  • @nikosspiropoulos8417
    @nikosspiropoulos8417 4 ปีที่แล้ว

    why the data on the api included the id and not the email and the password you posted? cannot understand it

  • @david-tracy
    @david-tracy 3 ปีที่แล้ว

    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.

  • @VKD007
    @VKD007 4 ปีที่แล้ว

    i forgot how to use axios thanks for revision man

  • @simonx3088
    @simonx3088 5 ปีที่แล้ว +2

    CROS problem get me crazy ,pls !help me!

  • @anuj7286
    @anuj7286 4 ปีที่แล้ว

    Sir i am little confused which one should i use Axios, fetch api or asynchronous function to get data and post data?

  • @mayarjaba6731
    @mayarjaba6731 2 ปีที่แล้ว

    what a leason♥
    thanks you♥♥

  • @ridwanhaqi6834
    @ridwanhaqi6834 3 ปีที่แล้ว

    i wonder how to catch error from validator of laravel api

  • @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.

  • @dell4559
    @dell4559 3 ปีที่แล้ว

    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

  • @QaisZayed.work90
    @QaisZayed.work90 4 หลายเดือนก่อน

    Thank you so much you just simplify it for me

  • @GAMEPOTA
    @GAMEPOTA 3 ปีที่แล้ว

    How about sending an objects list?

  • @greenshaheen
    @greenshaheen 5 ปีที่แล้ว

    U r an awesome instructor !!

    • @academind
      @academind  5 ปีที่แล้ว

      Thank you so much :)

  • @syrine5560
    @syrine5560 3 ปีที่แล้ว

    is it possible to use axios to create a video chat app?

  • @drarxonwarlock9874
    @drarxonwarlock9874 5 ปีที่แล้ว

    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  5 ปีที่แล้ว

      This might be what you're looking for => academind.com/learn/web-dev/how-to-become-a-better-web-developer/

  • @ivanshoshkov
    @ivanshoshkov 3 ปีที่แล้ว

    I have Max's react course and it wonderfull! I highly recommend it.

  • @JoeWong81
    @JoeWong81 5 ปีที่แล้ว +2

    ACADEMIND RULES!!!

  • @rainbow-jw3og
    @rainbow-jw3og 3 ปีที่แล้ว

    i need example for send for post body please

  • @SwapnilLonkar
    @SwapnilLonkar 3 ปีที่แล้ว

    Really helpfull. Thanks ✌

  • @李李李-d4r
    @李李李-d4r 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?

  • @manuelfleri88
    @manuelfleri88 5 ปีที่แล้ว

    Would it be possible to know which IDE are you using for these videos?

    • @academind
      @academind  5 ปีที่แล้ว

      I use Visual Studio Code.

    • @manuelfleri88
      @manuelfleri88 5 ปีที่แล้ว

      @@academind Thank you very much!

  • @bibasniba1832
    @bibasniba1832 4 ปีที่แล้ว

    Thank you Mister!

  • @robilaqaiser1984
    @robilaqaiser1984 4 ปีที่แล้ว

    Thnx sir for such a great tutorials

  • @hleet
    @hleet 4 ปีที่แล้ว

    thx for this video ! very helpful

  • @mertsevtekin1287
    @mertsevtekin1287 3 ปีที่แล้ว

    Great video!

  • @ariel._.9186
    @ariel._.9186 3 ปีที่แล้ว

    thanks, now, i know why i have to use axios

  • @mooodddy1
    @mooodddy1 5 ปีที่แล้ว

    Thanks, this was a really helpfull
    Please max explain http2 ?

  • @nimelofi
    @nimelofi 4 ปีที่แล้ว

    may I request for axios with svelte ?

  • @byedwardleung
    @byedwardleung 4 ปีที่แล้ว +1

    Thank you!

  • @AstroSardaukar
    @AstroSardaukar 5 ปีที่แล้ว

    Not a single thumb down? I was almost tempted to give the first! :)

    • @academind
      @academind  5 ปีที่แล้ว +1

      Very happy to get such an incredible feedback, please don't be the first with the thumb down here ;)

  • @samayunmiahchowdhury794
    @samayunmiahchowdhury794 5 ปีที่แล้ว

    Deserves 1 crore love react ...

  • @codingcomponents
    @codingcomponents 4 ปีที่แล้ว

    Thank you so much, it's really helpful. May God give you more success in your life. :-)

  • @germanmartirosyan6230
    @germanmartirosyan6230 5 ปีที่แล้ว

    Thanks for this videos, i had a question what to use, now i get an answer)

  • @AlThePal78
    @AlThePal78 3 ปีที่แล้ว

    I would have liked to see axios with async

  • @Lbmaniak
    @Lbmaniak 5 ปีที่แล้ว +1

    Usefully video

  • @kisoresubburaman7945
    @kisoresubburaman7945 5 ปีที่แล้ว

    Sir!! please do video for React360

  • @MontyKsycki
    @MontyKsycki 4 ปีที่แล้ว

    Thank You!!! :) Have a Great Day!! Enjoy ~ Peace :)

  • @BryanChance
    @BryanChance 3 ปีที่แล้ว

    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

  • @vincesanchez7790
    @vincesanchez7790 4 ปีที่แล้ว

    Use Axios in all projects cause it supports all browsers

  • @dimitrisandroid6483
    @dimitrisandroid6483 5 ปีที่แล้ว

    Thank you !!!

  • @RahulKumar-rk1tf
    @RahulKumar-rk1tf 5 ปีที่แล้ว +1

    Any suggestions for jQuery AJAX?

  • @bessamlegrand
    @bessamlegrand 3 ปีที่แล้ว

    Max i love you brother

  • @ioannisme7495
    @ioannisme7495 5 ปีที่แล้ว

    i love axios

  • @projectxny
    @projectxny 5 ปีที่แล้ว +1

    Finally..

  • @bahaaaldeen9611
    @bahaaaldeen9611 2 ปีที่แล้ว

    awesome

  • @robbradley1337
    @robbradley1337 5 ปีที่แล้ว +1

    Re gister lol

  • @daniyaltayyab2379
    @daniyaltayyab2379 2 ปีที่แล้ว

    waste of time dont watch it

  • @fieryninja2374
    @fieryninja2374 ปีที่แล้ว

    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 5 ปีที่แล้ว +4

    Thanks, this was a really helpfull mini series

  • @arunkutz
    @arunkutz 3 ปีที่แล้ว

    Thank you .. Very helpful video ... Just love the way you explain the usages ... :)