Комментарии:
You're extremely good
ОтветитьWhere is the image stored, I'm confused
ОтветитьCan we use the result fetched globally?!
ОтветитьI feel happy while studying from you.
Ответить<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<img src="" alt="nothing" id="rainbow" width="100%">
<script>
console.log('About to fetch Data');
fetch('rainbow.jpg')
.then(response => {
console.log(response);
return response.blob();
})
.then(blob => {
console.log(blob);
const imgUrl = URL.createObjectURL(blob);
document.getElementById('rainbow').src = imgUrl;
})
.catch(error => {
console.error('Error fetching the image:', error);
});
</script>
</body>
</html>
Great vid tks
Ответитьhow to add mutiple images
Ответитьsince its not working
Ответитьone question did you already save the image already in your folder or just get through the object url ??
Ответитьim getting error failed, reason: Parse Error: Invalid header token
i dont know why
Did I miss the part where the rainbow.jpg is created and referenced?
ОтветитьI get upset when I see so much traffic on my road to greatness..API 400k views 😒
Ответитьwhat is blob() in here ,,i mean how are u using response.blob() ,,,,,where it is defined ????
ОтветитьThis is a BRILLIANT lesson! Its very good. Thank you
ОтветитьThank you for the videos!! so i managed to do the Fetch() API successfully . I now want to pass the SRC with the encrypted payload to a browser . How can i achive that please assist ?
ОтветитьDude you are amazing!! Fantastic video!
Ответитьsmol doubt, I tried fetch first rainbow part, but Im getting false, 404
ОтветитьThis is soo informative and well done! I love your enthusiastic voice tone. I can't thank you enough. 👍🏽👍🏽👍🏽👍🏽👍🏽
ОтветитьThe exercises in the final part are really good! I used other API called dummyjson to put a random quote with the author of the quote in the page. Each time i reload the page is a different quote.
ОтветитьThanks for this video man, and grateful for google for linking it as 3rd option for beginners looking for practical fetch API lessons.👍
ОтветитьFinally, I freakin did it yes! Thank you!
ОтветитьA massive thanks from here for your instructive lessons and your effort you're putting in this!
Bow!
i'm glad to know english, just to say: thank you for all effort put on those videos.
ОтветитьYou are a saviour
ОтветитьI've been looking for this for a very long time!
Ответитьi never really understood how to use api until i watched ur vid .
Ответитьbest teacher :)
ОтветитьI like how he made everything fun, even a person with no programming background can understand his explanation... I wish they taught me this way from the start
ОтветитьYou are a treasure, thank you!
ОтветитьExcellent - thanks! Just subscribed and will be watching some more videos related to fetch and async await.
ОтветитьGood fetch tutorial thanks. I have a question, Can I use fetch in combination with setInterval? The thing is that I have a json file that update every 10 seconds, and I need get the current data, to print in the html and handle the same data to do another stuff. What do you recommend to me?
ОтветитьReally like your style of teaching. You simplify concepts to the basic.
ОтветитьSuperb explanation
ОтветитьI notice that whenever I refresh my API the indexation changes. Any idea on what to do in this situation?
ОтветитьMerci !
ОтветитьYou and your channel are brilliant
ОтветитьBeen coding in C the past couple months can’t wait to come back to JavaScript.
ОтветитьGreate info! thank you so much!
ОтветитьHello Community, Anyone else could explain me with an easey way. What is a blob? im getting stucked understanding the blobs
ОтветитьYou are my favorite teacher because you are so fun to watch so happy and animated thank you so much :)
ОтветитьCORS errors trying to fetch image - first read it's because it's local, so tried fetching from URL I hosted it, still CORS error. Solutions look absurd, setting up reverse proxies on the network just to complete a simple js tutorial.... any thoughts?
ОтветитьI find it difficult to figure out where the "rainbow.jpg" comes from
ОтветитьThis stuff wasn't really setting right with me before. You helped me figure it click for me but that wasn't the best part of the video. You make it fun. Life doesn't have to be boring, why not make it fun? Thanks a ton!
Ответить