8 Tricks When Using the Fetch() API
Syntax - Tasty Web Development Treats

8 Tricks When Using the Fetch() API

2023-08-21
In this Hasty Treat, Scott and Wes talk about 8 tricks to try when using the Fetch() API. Show Notes 00:23 Welcome 02:14 1) Stream The Result // Create a new TextDecoder instance const decoder = new TextDecoder(); // Make the fetch request fetch('https://api.example.com/streaming-data') .then(response => { // Check if the response is valid if (!response.ok) { throw new Error('Network response was not ok'); } // Stream the response data using a TextDecoder const reader =...
View more
Comments (3)

More Episodes

All Episodes>>

Get this podcast on your phone, Free

Create Your Podcast In Minutes

  • Full-featured podcast site
  • Unlimited storage and bandwidth
  • Comprehensive podcast stats
  • Distribute to Apple Podcasts, Spotify, and more
  • Make money with your podcast
Get Started
It is Free