Back to Webfundamentals

Introduction to the Fetch API {: .page-title }

src/content/en/shows/google-io/2015/fetch.md

0.3724 B
Original Source

project_path: /web/_project.yaml book_path: /web/shows/_book.yaml

{# wf_updated_on: 2015-05-27 #} {# wf_published_on: 2015-05-27 #} {# wf_youtube_id: g6-ZwZmRncs #}

Introduction to the Fetch API {: .page-title }

<div class="video-wrapper"> <iframe class="devsite-embedded-youtube-video" data-video-id="g6-ZwZmRncs" data-autohide="1" data-showinfo="0" frameborder="0" allowfullscreen> </iframe> </div>

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.