How to Easily Call APIs With Fetch and Async/Await in JavaScript

preview_player
Показать описание
In today's video I'll be showing you how easy it is to call APIs (REST) using the Fetch API in JavaScript and Async/Await.

This is the way I typically call my APIs and provide authorization tokens or headers in the front-end (if appropriate).

For your reference, check this out:

If this video helped you out and you'd like to see more, make sure to leave a like and subscribe to dcode!

#dcode #javascript
Рекомендации по теме
Комментарии
Автор

What is more exciting than seeing Dcode new video notification.

abubalo
Автор

I really wanna say THANK YOU. This tutorial helped me solve a problem in which I was stuck for weeks!

ernestoluckie
Автор

This video helped me a tone with working out how to build a feature. Thank you so much <3

LD-oqco
Автор

How is the job market now in Australia for software developers?

muntasirhossen
Автор

good video, mate, I'm going to try to use some of this to do basic authentication on an open power automate or gappsscript endpoint for my browser extension.

webdevuk
Автор

can someone explain why you probably shouldn't use an onClick handler on the element?

LD-oqco
Автор

What color theme are you using in this video? I like it so much.

alexandruteodor
Автор

Even if you get your API token from the database it'll be still visible in the dev tools if you have to send it through in the Headers. Am i wrong here?

tamas-pamas
Автор

Thanks, btw your udemy link does not work, 404

leonvanrijswijk
Автор

Is it possible to request a tutorial? If yes, this is the story. So, I want to know how long a user is on a page. I know how to set an entry time var but I don't know how to set an exit time var and send the data to backend right before the user moves to other page. Please teach me how to do that. I tried to call a function with onbeforeunload but it didn't work for me.

umangternate
Автор

I am getting an error in javascript when using for loop for assigning id dynamically. Can u guide? How to share u code ?? Ur mail id pls

vishvish