Fetch API (100 Days of Google Dev)

preview_player
Показать описание
Fetch is a new API that makes ‘Fetch’ing remote resources much easier. Like XMLHttpRequest, Fetch can be used for making requests same origin or cross domain requests. Fetch uses a cleaner, more powerful API that separates the request from the response and uses a promise to return the response.

100 Days of Google Dev / 100 developer videos over 100 days / #GoogleDev100

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

`fetch` is great and `Promises` are also great but there's just one problem. You can't cancel Promises per Promise spec like you can with Observables

PatrickJS
Автор

So every tutorial I've found about fetch ends with console.logging the json, which doesn't really accomplish much. How do I store that json in a variable or use it elsewhere in my app? Am I bound to always calling a function in my last .then( ) with the json as input?

dkennell
Автор

Ah so this is what I saw in the Netflix source. They have endless .then structures, looked pretty neat actually

argus
Автор

At 4:58 he states that cancellation is "in the spec" but it's not:


...and nobody is agreed on it yet either:

plaxdan
Автор

I guess the same nomenclature issue can be brought up with fetch…why call it fetch when sending POST requests?

restlessdesign
Автор

lol @ugly oath strings. this sounds good but its still missing some key features.

ChunkyChest
Автор

Will play with fetch() but will likely stick with jQuery for most uses.

Of course, valid or not, it cries out fit the Mean Girls reference.

DaveJacoby
Автор

Hi, love your lecture it gave me an insight.But would need you help a little.I want to fetch user input detail about them self from a database and send it to an API.

efedanielonah-ojobo
Автор

I am using fetch for a while in my Express and React apps. Works pretty well and i like it! Thanks Google!

miroslavspirkoski
Автор

Why you do this to his voice? Why to use stereo mics for recording?

almazmusic
Автор

how to download image from a web server using Fetch with CORS support since im on localhost

ownagejuice