From adf83c64b7e0162ec09f3afe53e98e8ce5a8e0b3 Mon Sep 17 00:00:00 2001 From: LeviDing Date: Mon, 16 Nov 2020 00:32:55 +0800 Subject: [PATCH] Update article.md --- .../2-async-iterators-generators/article.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/1-js/12-generators-iterators/2-async-iterators-generators/article.md b/1-js/12-generators-iterators/2-async-iterators-generators/article.md index 00a56b9c..072e1047 100644 --- a/1-js/12-generators-iterators/2-async-iterators-generators/article.md +++ b/1-js/12-generators-iterators/2-async-iterators-generators/article.md @@ -363,7 +363,7 @@ More explanations about how it works: - The initial URL is `https://api.github.com/repos//commits`, and the next page will be in the `Link` header of the response. - The `fetch` method allows us to supply authorization and other headers if needed -- here GitHub requires `User-Agent`. 2. The commits are returned in JSON format. -3. We should get the next page URL from the `Link` header of the response. It has a special format, so we use a regular expression for that (we will lern this feature in [Regular expressions](info:regular-expressions)). +3. We should get the next page URL from the `Link` header of the response. It has a special format, so we use a regular expression for that (we will learn this feature in [Regular expressions](info:regular-expressions)). - The next page URL may look like `https://api.github.com/repositories/93253246/commits?page=2`. It's generated by GitHub itself. 4. Then we yield the received commits one by one, and when they finish, the next `while(url)` iteration will trigger, making one more request.